mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #87016 from flokli/nsswitch-cleanup
nixos/nsswitch cleanup nss modules
This commit is contained in:
commit
4a85559ffc
7 changed files with 32 additions and 52 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue