From 2a0b35b2ecfc57c79b5da7aae0c0e96ce13af89b Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Wed, 30 Apr 2025 22:34:27 +0800 Subject: [PATCH] feat(eurus): add static ip and dns servers --- hosts/eurus.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/eurus.nix b/hosts/eurus.nix index b26d44b..2d0731d 100644 --- a/hosts/eurus.nix +++ b/hosts/eurus.nix @@ -4,4 +4,18 @@ ]; boot-config.bootloader = "systemd-boot"; hardware-config.cpu = "amd"; + networking = { + interfaces.enp3s0.useDHCP = false; # Disable DHCP, we use static IP + interfaces.enp3s0.ipv4.addresses = [ + { + address = "160.191.77.168"; + prefixLength = 24; # Or 255.255.255.0 + } + ]; + defaultGateway = "160.191.77.1"; # The gateway from the admin panel + nameservers = [ + "1.1.1.1" + "1.0.0.1" + ]; # DNS servers from the admin panel + }; }