From 6ea916603cd70fcae3f4fc0a94ba56fd1e28c48b Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 6 Jun 2024 19:30:11 +0200 Subject: [PATCH] networking: set networking.domain in core module --- hosts/metronom/networking.nix | 1 - hosts/nachtigall/networking.nix | 1 - hosts/tankstelle/networking.nix | 1 - modules/core/networking.nix | 2 ++ 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hosts/metronom/networking.nix b/hosts/metronom/networking.nix index 0aedad54..b309ec32 100644 --- a/hosts/metronom/networking.nix +++ b/hosts/metronom/networking.nix @@ -11,7 +11,6 @@ 127.0.0.2 mail.pub.solar mail ::1 mail.pub.solar mail ''; - networking.domain = "pub.solar"; networking.hostId = "00000002"; networking.enableIPv6 = true; diff --git a/hosts/nachtigall/networking.nix b/hosts/nachtigall/networking.nix index e7f9ecdb..a27c3fe5 100644 --- a/hosts/nachtigall/networking.nix +++ b/hosts/nachtigall/networking.nix @@ -7,7 +7,6 @@ { networking.hostName = "nachtigall"; - networking.domain = "pub.solar"; networking.hostId = "00000001"; # Network (Hetzner uses static IP assignments, and we don't use DHCP here) diff --git a/hosts/tankstelle/networking.nix b/hosts/tankstelle/networking.nix index 2c8f7608..1ef2e26a 100644 --- a/hosts/tankstelle/networking.nix +++ b/hosts/tankstelle/networking.nix @@ -7,7 +7,6 @@ { networking = { hostName = "tankstelle"; - domain = "pub.solar"; enableIPv6 = true; defaultGateway = { address = "80.244.242.1"; diff --git a/modules/core/networking.nix b/modules/core/networking.nix index 0ec6eaf0..91af9142 100644 --- a/modules/core/networking.nix +++ b/modules/core/networking.nix @@ -27,6 +27,8 @@ # Don't expose SSH via public interfaces networking.firewall.interfaces.wg-ssh.allowedTCPPorts = [ 22 ]; + networking.domain = config.pub-solar-os.networking.domain; + networking.hosts = { "10.7.6.1" = [ "nachtigall.wg.${config.pub-solar-os.networking.domain}" ]; "10.7.6.2" = [ "flora-6.wg.${config.pub-solar-os.networking.domain}" ];