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