summaryrefslogtreecommitdiffstats
path: root/nixos/modules/config/nsswitch.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-05-05 15:03:14 +0200
committerFlorian Klink <flokli@flokli.de>2020-05-05 15:59:30 +0200
commitc0995d22eed1a19ac9442c8460c18dd6a4c389b7 (patch)
treee5ee334ee66e7d9a5693705c63949ab7d9a211ce /nixos/modules/config/nsswitch.nix
parent7426bec45ef03c55bfc5bb27cdc60d6163aeed04 (diff)
nixos/systemd: move NSS module logic to systemd module
We keep the conditional on only adding if nscd is enabled for now.
Diffstat (limited to 'nixos/modules/config/nsswitch.nix')
-rw-r--r--nixos/modules/config/nsswitch.nix13
1 files changed, 0 insertions, 13 deletions
diff --git a/nixos/modules/config/nsswitch.nix b/nixos/modules/config/nsswitch.nix
index b191e6feb0aa..22ddb3490c8e 100644
--- a/nixos/modules/config/nsswitch.nix
+++ b/nixos/modules/config/nsswitch.nix
@@ -8,8 +8,6 @@ let
# only with nscd up and running we can load NSS modules that are not integrated in NSS
canLoadExternalModules = config.services.nscd.enable;
- myhostname = canLoadExternalModules;
- mymachines = canLoadExternalModules;
# XXX Move these to their respective modules
nssmdns = canLoadExternalModules && config.services.avahi.nssmdns;
nsswins = canLoadExternalModules && config.services.samba.nsswins;
@@ -17,19 +15,15 @@ let
hostArray = mkMerge [
(mkBefore [ "files" ])
- (mkIf mymachines [ "mymachines" ])
(mkIf nssmdns [ "mdns_minimal [NOTFOUND=return]" ])
(mkIf nsswins [ "wins" ])
(mkAfter [ "dns" ])
(mkIf nssmdns (mkOrder 1501 [ "mdns" ])) # 1501 to ensure it's after dns
- (mkIf myhostname (mkOrder 1600 [ "myhostname" ])) # 1600 to ensure it's always the last
];
passwdArray = mkMerge [
(mkBefore [ "files" ])
(mkIf ldap [ "ldap" ])
- (mkIf mymachines [ "mymachines" ])
- (mkIf canLoadExternalModules (mkAfter [ "systemd" ]))
];
shadowArray = mkMerge [
@@ -157,12 +151,5 @@ in {
hosts = hostArray;
services = mkBefore [ "files" ];
};
-
- # Systemd provides nss-myhostname to ensure that our hostname
- # always resolves to a valid IP address. It returns all locally
- # configured IP addresses, or ::1 and 127.0.0.2 as
- # fallbacks. Systemd also provides nss-mymachines to return IP
- # addresses of local containers.
- system.nssModules = (optionals canLoadExternalModules [ config.systemd.package.out ]);
};
}