From d8a86fddb6271328e8928e6efbbabe8847e7345f Mon Sep 17 00:00:00 2001 From: javalsai Date: Sat, 2 May 2026 23:21:35 +0200 Subject: [PATCH] nixos/networking: add own fqdn to extraHosts --- nixos/common.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nixos/common.nix b/nixos/common.nix index 4ff3435..54cfc67 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -4,6 +4,7 @@ lib, pkgs, self, + config, ... }: let @@ -92,6 +93,22 @@ in networking = { networkmanager.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; + firewall = { enable = true;