mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
Merge pull request #279433 from wentasah/nsswitch-mdns
nixos/avahi-daemon: let nssmdns{4,6} options affect also non-minimal …
This commit is contained in:
commit
3d1fe1445c
@ -273,17 +273,17 @@ in
|
||||
|
||||
system.nssModules = optional (cfg.nssmdns4 || cfg.nssmdns6) pkgs.nssmdns;
|
||||
system.nssDatabases.hosts = let
|
||||
mdnsMinimal = if (cfg.nssmdns4 && cfg.nssmdns6) then
|
||||
"mdns_minimal"
|
||||
mdns = if (cfg.nssmdns4 && cfg.nssmdns6) then
|
||||
"mdns"
|
||||
else if (!cfg.nssmdns4 && cfg.nssmdns6) then
|
||||
"mdns6_minimal"
|
||||
"mdns6"
|
||||
else if (cfg.nssmdns4 && !cfg.nssmdns6) then
|
||||
"mdns4_minimal"
|
||||
"mdns4"
|
||||
else
|
||||
"";
|
||||
in optionals (cfg.nssmdns4 || cfg.nssmdns6) (mkMerge [
|
||||
(mkBefore [ "${mdnsMinimal} [NOTFOUND=return]" ]) # before resolve
|
||||
(mkAfter [ "mdns" ]) # after dns
|
||||
(mkBefore [ "${mdns}_minimal [NOTFOUND=return]" ]) # before resolve
|
||||
(mkAfter [ "${mdns}" ]) # after dns
|
||||
]);
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
Loading…
Reference in New Issue
Block a user