From 7a60c58a74d06966c16629dc99e6a378eef3a09f Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 22 May 2025 23:21:40 -0500 Subject: [PATCH] Set Jude a static IP address Give both Jude interfaces their own IP addresses and use those to set the TLS name better Fixes #9 --- hosts/genesis/net/hosts | 2 ++ hosts/genesis/networking/dhcp.nix | 8 +++++++ hosts/jude/default.nix | 39 +++++++++++++++++++++++++++---- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/hosts/genesis/net/hosts b/hosts/genesis/net/hosts index 4a76ff9..168dc70 100644 --- a/hosts/genesis/net/hosts +++ b/hosts/genesis/net/hosts @@ -13,6 +13,8 @@ 10.42.1.7 hosea hosea.thehellings.lan 10.42.1.8 jeremiah jeremiah.thehellings.lan minio-02.thehellings.lan 10.42.1.9 ivr ivr.thehellings.lan +10.42.1.10 jude jude.thehellings.lan +10.42.1.11 jude1 jude1.thehellings.lan 10.42.1.12 tv # VMs diff --git a/hosts/genesis/networking/dhcp.nix b/hosts/genesis/networking/dhcp.nix index fd03935..630f4ec 100644 --- a/hosts/genesis/networking/dhcp.nix +++ b/hosts/genesis/networking/dhcp.nix @@ -101,6 +101,14 @@ hw-address = "c8:5e:a9:54:9e:c6"; # IVR laptop Wi-Fi ip-address = "10.42.1.9"; } + { + hw-address = "c8:4b:d6:ca:20:8f"; + ip-address = "10.42.1.10"; # Jude - but maybe through the monitor? + } + { + hw-address = "04:7c:16:d5:60:6f"; + ip-address = "10.42.1.11"; # Jude - but straight in the motherboard + } ######################################## # VM servers # diff --git a/hosts/jude/default.nix b/hosts/jude/default.nix index 7e4033c..c998b8c 100644 --- a/hosts/jude/default.nix +++ b/hosts/jude/default.nix @@ -93,7 +93,32 @@ hostName = "jude"; networkmanager.enable = lib.mkForce true; enableIPv6 = false; - interfaces.enp12s0.useDHCP = true; + useDHCP = false; + interfaces = { + # This seems to be direct mother board interface + enp12s0.useDHCP = true; + #enp12s0.ipv4.addresses = [ + #{ + #address = "10.42.1.11"; + #prefixLength = 16; + #} + #]; + # This seems to be the one that comes through the monitor hookup + enp14s0u1u2.ipv4.addresses = [ + { + address = "10.42.1.10"; + prefixLength = 16; + } + ]; + }; + defaultGateway = { + address = "10.42.1.1"; + interface = "enp14s0u1u2"; + }; + nameservers = [ + "10.42.1.5" + "10.42.1.1" + ]; firewall = { enable = false; allowedTCPPorts = [ 21000 ]; @@ -118,10 +143,14 @@ # Let's do a sound thing services = { - k3s.extraFlags = [ - "--tls-san 10.42.0.6" - "--bind-address 10.42.0.6" - ]; + k3s.extraFlags = + let + ip = (builtins.head config.networking.interfaces.enp14s0u1u2.ipv4.addresses).address; + in + [ + "--tls-san ${ip}" + "--bind-address ${ip}" + ]; pipewire = { enable = true; alsa.enable = true;