From 6916cddc48e26b3d6004e581d237558cf87848ed Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Mon, 3 Feb 2025 17:23:12 +0100 Subject: [PATCH] Use IP from config as static IP --- utils.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/utils.nix b/utils.nix index ca01167..1b9a9f7 100644 --- a/utils.nix +++ b/utils.nix @@ -30,7 +30,19 @@ # Disable automatic pgp key generation based on ssh keys sops.gnupg.sshKeyPaths = [ ]; - networking.hostName = hostConfig.hostname; + networking = { + hostName = hostConfig.hostname; + interfaces.ens18.ipv4.addresses = [ + { + address = hostConfig.ip; + prefixLength = 24; + } + ]; + defaultGateway = { + address = "192.168.10.1"; + interface = "ens18"; + }; + }; system.stateVersion = hostConfig.stateVersion; } )