nixos/networking: add own fqdn to extraHosts

This commit is contained in:
2026-05-02 23:21:35 +02:00
parent 6cc9f8e3d0
commit 7921d6db61
+17
View File
@@ -4,6 +4,7 @@
lib, lib,
pkgs, pkgs,
self, self,
config,
... ...
}: }:
let let
@@ -93,6 +94,22 @@ in
networkmanager.enable = true; networkmanager.enable = true;
firewall.enable = true; firewall.enable = true;
extraHosts =
let
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;
}; };
virtualisation.podman.enable = true; virtualisation.podman.enable = true;