nixos/networking: fix extraHosts generation

This commit is contained in:
2026-05-04 01:05:32 -04:00
parent 015bbc3d66
commit 3a5d5d27f4
+8 -15
View File
@@ -99,22 +99,15 @@ in
extraHosts =
let
subdomains = [
""
".git"
];
subdomains = [ "git" ];
inherit (config.networking) fqdn;
hosts = [ fqdn ] ++ map (sub: "${sub}.${fqdn}") subdomains;
in
builtins.foldl' (
hosts-acc: domain-prefix:
let
host = "${domain-prefix}${config.networking.fqdn}";
in
hosts-acc
+ ''
127.0.0.1 ${host}
::1 ${host}
''
) "" subdomains;
lib.concatMapStrings (host: ''
127.0.0.1 ${host}
::1 ${host}
'') hosts;
};
virtualisation.podman.enable = true;