fix: Correctly generate extraHosts for vhosts
This commit is contained in:
parent
7217af2233
commit
c2d96e936e
@ -121,10 +121,11 @@ in
|
||||
})
|
||||
cfg.hosts;
|
||||
|
||||
networking.extraHosts = concatMapStringsSep "\n"
|
||||
(domain:
|
||||
mkIf cfg.hosts.${domain}.resolveLocally "127.0.0.1 ${domain}"
|
||||
networking.extraHosts = lib.flatten (lib.mapAttrsToList
|
||||
(domain: hostConf:
|
||||
lib.optionals hostConf.resolveLocally "127.0.0.1 ${domain}"
|
||||
)
|
||||
(lib.attrNames cfg.hosts);
|
||||
cfg.hosts
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user