From 6989f4be08aeae7ad1e97f61fe38db49322b65ae Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Tue, 19 Aug 2025 16:44:48 +0200 Subject: [PATCH] Add static network configuration to srv01-hf --- hosts/srv01.hf/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hosts/srv01.hf/default.nix b/hosts/srv01.hf/default.nix index a7a3540..19d5ca9 100644 --- a/hosts/srv01.hf/default.nix +++ b/hosts/srv01.hf/default.nix @@ -17,6 +17,25 @@ ./hardware-configuration.nix ]; + systemd.network = { + enable = true; + networks."10-wan" = { + matchConfig.Name = "ens18"; + networkConfig.DHCP = "no"; + address = [ + "77.90.17.93/24" + "2a06:de00:100:63::2/64" + ]; + routes = [ + { Gateway = "77.90.17.1"; } + { Gateway = "2a06:de00:100::1"; GatewayOnLink = true; } + ]; + dns = [ "9.9.9.9" ]; + }; + }; + + # Disable classic networking configuration + networking.useDHCP = lib.mkForce false; networking.hostName = "srv01-hf"; # Define your hostname.