From 3a5d5d27f4d41c9911b06066bfbbca0893a9cbfd Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Mon, 4 May 2026 01:05:32 -0400 Subject: [PATCH] nixos/networking: fix extraHosts generation --- nixos/common.nix | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/nixos/common.nix b/nixos/common.nix index 5291f89..970fc51 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -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;