From 918eb71e7e65de360336ae36c700f6563daef554 Mon Sep 17 00:00:00 2001 From: Roy Dumblauskas Date: Thu, 17 Apr 2025 09:06:18 -0500 Subject: [PATCH] import ip from .nix file --- nixos/configuration.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 34b0251..a3c208c 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -33,16 +33,17 @@ ]; }; - networking.hostName = meta.hostname; + networking.hostname = meta.hostname; - networking.interfaces.eth0.ipv4.addresses = [ - { - address = "${ - config.sops.secrets."nixos-homelab-00".path - }"; - prefixLength = 24; - } - ]; + let + addresses = import ./ip-addresses.nix; + in { + networking.interfaces.eth0.ipv4.addresses = [ + { + address = addresses.${meta.hostname}; + prefixLength = 24; + } + ]; # Set your time zone. time.timeZone = "America/Chicago";