From fa36c5879cf420becf0af61f5b824ace31cfd454 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 16 Jul 2024 20:14:30 +0200 Subject: [PATCH] hosts: use dynamic primary interface name --- hosts/VEGAS/system.nix | 2 +- hosts/checkmate/system.nix | 4 ++-- hosts/prophet/system.nix | 4 ++-- hosts/soda/system.nix | 4 ++-- hosts/thunderskin/system.nix | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hosts/VEGAS/system.nix b/hosts/VEGAS/system.nix index 487755c..e45dffc 100644 --- a/hosts/VEGAS/system.nix +++ b/hosts/VEGAS/system.nix @@ -46,7 +46,7 @@ time.timeZone = "Europe/Helsinki"; networking.useDHCP = false; - networking.interfaces.enp0s31f6.useDHCP = true; + networking.interfaces.${config.reflection.interfaces.primary.link}.useDHCP = true; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/hosts/checkmate/system.nix b/hosts/checkmate/system.nix index 0300754..f53ee59 100644 --- a/hosts/checkmate/system.nix +++ b/hosts/checkmate/system.nix @@ -1,4 +1,4 @@ -{ depot, ... }: +{ config, depot, ... }: { imports = @@ -22,7 +22,7 @@ time.timeZone = "Europe/Zurich"; networking.useDHCP = false; - networking.interfaces.ens3.useDHCP = true; + networking.interfaces.${config.reflection.interfaces.primary.link}.useDHCP = true; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/hosts/prophet/system.nix b/hosts/prophet/system.nix index 929479d..1d92224 100644 --- a/hosts/prophet/system.nix +++ b/hosts/prophet/system.nix @@ -1,4 +1,4 @@ -{ depot, ... }: +{ config, depot, ... }: { imports = @@ -24,7 +24,7 @@ time.timeZone = "Europe/Zurich"; networking.useDHCP = false; - networking.interfaces.enp0s6.useDHCP = true; + networking.interfaces.${config.reflection.interfaces.primary.link}.useDHCP = true; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/hosts/soda/system.nix b/hosts/soda/system.nix index cbed136..09bc7b4 100644 --- a/hosts/soda/system.nix +++ b/hosts/soda/system.nix @@ -1,4 +1,4 @@ -{ depot, ... }: +{ config, depot, ... }: { imports = with depot.nixosModules; [ @@ -12,7 +12,7 @@ networking.useDHCP = false; - networking.interfaces.eth0.useDHCP = true; + networking.interfaces.${config.reflection.interfaces.primary.link}.useDHCP = true; networking.nameservers = [ depot.hours.VEGAS.interfaces.vstub.addr ]; diff --git a/hosts/thunderskin/system.nix b/hosts/thunderskin/system.nix index 22351bc..69e56da 100644 --- a/hosts/thunderskin/system.nix +++ b/hosts/thunderskin/system.nix @@ -1,4 +1,4 @@ -{ depot, ... }: +{ config, depot, ... }: { imports = @@ -22,7 +22,7 @@ time.timeZone = "Europe/Zurich"; networking.useDHCP = false; - networking.interfaces.ens3.useDHCP = true; + networking.interfaces.${config.reflection.interfaces.primary.link}.useDHCP = true; i18n.defaultLocale = "en_US.UTF-8";