From 254e9934ad33ce0681e34f1af7a18c1c49b6e058 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 20 Dec 2021 03:06:55 +0100 Subject: [PATCH] greddost: static ip --- hosts/greddost/configuration.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/hosts/greddost/configuration.nix b/hosts/greddost/configuration.nix index c3cd78b..2a4cfda 100644 --- a/hosts/greddost/configuration.nix +++ b/hosts/greddost/configuration.nix @@ -47,7 +47,26 @@ networking.hostName = "greddost"; # Define your hostname. - networking.interfaces.ens18.useDHCP = true; + networking.interfaces.ens18.useDHCP = false; + + networking.defaultGateway = "129.241.210.129"; + networking.interfaces.ens18.ipv4 = { + addresses = [ + { + address = "129.241.210.174"; + prefixLength = 25; + } + ]; + }; + networking.interfaces.ens18.ipv6 = { + addresses = [ + { + address = "2001:700:300:1900::174"; + prefixLength = 64; + } + ]; + }; + networking.nameservers = [ "129.241.0.200" "129.241.0.201" ]; # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 25565 ];