nixos/networking: fix extraHosts generation
This commit is contained in:
+6
-13
@@ -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
|
||||
+ ''
|
||||
lib.concatMapStrings (host: ''
|
||||
127.0.0.1 ${host}
|
||||
::1 ${host}
|
||||
''
|
||||
) "" subdomains;
|
||||
'') hosts;
|
||||
};
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user