Merge pull request #322980 from michaelfranzl/fix-nss-libvirt
nixos/virtualisation: increase priority for libvirt NSS modules
This commit is contained in:
@@ -489,7 +489,7 @@ in
|
||||
system.nssModules = [ cfg.package.out ];
|
||||
system.nssDatabases = {
|
||||
hosts = (mkMerge [
|
||||
(mkOrder 400 ["mymachines"]) # 400 to ensure it comes before resolve (which is mkBefore'd)
|
||||
(mkOrder 400 ["mymachines"]) # 400 to ensure it comes before resolve (which is 501)
|
||||
(mkOrder 999 ["myhostname"]) # after files (which is 998), but before regular nss modules
|
||||
]);
|
||||
passwd = (mkMerge [
|
||||
|
||||
@@ -545,9 +545,10 @@ in
|
||||
};
|
||||
|
||||
system.nssModules = optional (cfg.nss.enable or cfg.nss.enableGuest) cfg.package;
|
||||
system.nssDatabases.hosts = builtins.concatLists [
|
||||
(optional cfg.nss.enable "libvirt")
|
||||
(optional cfg.nss.enableGuest "libvirt_guest")
|
||||
system.nssDatabases.hosts = mkMerge [
|
||||
# ensure that the NSS modules come between mymachines (which is 400) and resolve (which is 501)
|
||||
(mkIf cfg.nss.enable (mkOrder 430 [ "libvirt" ]))
|
||||
(mkIf cfg.nss.enableGuest (mkOrder 432 [ "libvirt_guest" ]))
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user