aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/system/boot/resolved.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/system/boot/resolved.nix')
-rw-r--r--nixpkgs/nixos/modules/system/boot/resolved.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/system/boot/resolved.nix b/nixpkgs/nixos/modules/system/boot/resolved.nix
index da61c64faf8..b7aaef575ac 100644
--- a/nixpkgs/nixos/modules/system/boot/resolved.nix
+++ b/nixpkgs/nixos/modules/system/boot/resolved.nix
@@ -138,6 +138,10 @@ in
users.users.resolved.group = "systemd-resolve";
+ # add resolve to nss hosts database if enabled and nscd enabled
+ # system.nssModules is configured in nixos/modules/system/boot/systemd.nix
+ system.nssDatabases.hosts = optional config.services.nscd.enable "resolve [!UNAVAIL=return]";
+
systemd.additionalUpstreamSystemUnits = [
"systemd-resolved.service"
];