about summary refs log tree commit diff
path: root/nixos/modules/system/boot
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-05-14 14:55:43 +0200
committerGitHub <noreply@github.com>2020-05-14 14:55:43 +0200
commit4a85559ffcbe5af70c28a69de47f4276ffca6cdd (patch)
tree6b70f5943567385ae68cc1e351b703e55019fb6e /nixos/modules/system/boot
parent0ffc85d64b081f0210787435122ef7f42b81d791 (diff)
parent23ba50611321035e02f5bfc2f5f809600ccc2f7b (diff)
downloadnixlib-4a85559ffcbe5af70c28a69de47f4276ffca6cdd.tar
nixlib-4a85559ffcbe5af70c28a69de47f4276ffca6cdd.tar.gz
nixlib-4a85559ffcbe5af70c28a69de47f4276ffca6cdd.tar.bz2
nixlib-4a85559ffcbe5af70c28a69de47f4276ffca6cdd.tar.lz
nixlib-4a85559ffcbe5af70c28a69de47f4276ffca6cdd.tar.xz
nixlib-4a85559ffcbe5af70c28a69de47f4276ffca6cdd.tar.zst
nixlib-4a85559ffcbe5af70c28a69de47f4276ffca6cdd.zip
Merge pull request #87016 from flokli/nsswitch-cleanup
nixos/nsswitch cleanup nss modules
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r--nixos/modules/system/boot/systemd.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 36a25c4e6c3a..7c4dc93e2fb6 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -832,16 +832,8 @@ in
 
     system.build.units = cfg.units;
 
-    # Systemd provides various NSS modules to look up dynamic users, locally
-    # configured IP adresses and local container hostnames.
-    # On NixOS, these can only be passed to the NSS system via nscd (and its
-    # LD_LIBRARY_PATH), which is why it's usually a very good idea to have nscd
-    # enabled (also see the config.nscd.enable description).
-    # While there is already an assertion in place complaining loudly about
-    # having nssModules configured and nscd disabled, for some reason we still
-    # check for nscd being enabled before adding to nssModules.
-    system.nssModules = optional config.services.nscd.enable systemd.out;
-    system.nssDatabases = mkIf config.services.nscd.enable {
+    system.nssModules = [ systemd.out ];
+    system.nssDatabases = {
       hosts = (mkMerge [
         [ "mymachines" ]
         (mkOrder 1600 [ "myhostname" ] # 1600 to ensure it's always the last
@@ -851,6 +843,10 @@ in
         [ "mymachines" ]
         (mkAfter [ "systemd" ])
       ]);
+      group = (mkMerge [
+        [ "mymachines" ]
+        (mkAfter [ "systemd" ])
+      ]);
     };
 
     environment.systemPackages = [ systemd ];