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 = extraHosts =
let let
subdomains = [ subdomains = [ "git" ];
""
".git" inherit (config.networking) fqdn;
]; hosts = [ fqdn ] ++ map (sub: "${sub}.${fqdn}") subdomains;
in in
builtins.foldl' ( lib.concatMapStrings (host: ''
hosts-acc: domain-prefix: 127.0.0.1 ${host}
let ::1 ${host}
host = "${domain-prefix}${config.networking.fqdn}"; '') hosts;
in
hosts-acc
+ ''
127.0.0.1 ${host}
::1 ${host}
''
) "" subdomains;
}; };
virtualisation.podman.enable = true; virtualisation.podman.enable = true;