diff --git a/machines/aramis/networking.nix b/machines/aramis/networking.nix index 929b44d..9322f1f 100644 --- a/machines/aramis/networking.nix +++ b/machines/aramis/networking.nix @@ -15,9 +15,11 @@ }; }; - # Which interface is used to connect to the internet - my.networking.externalInterface = "enp0s3"; + my.hardware.networking = { + # Which interface is used to connect to the internet + externalInterface = "enp0s3"; - # Enable WiFi integration - my.networking.wireless.enable = true; + # Enable WiFi integration + wireless.enable = true; + }; } diff --git a/machines/porthos/networking.nix b/machines/porthos/networking.nix index e593eeb..1e2c9cd 100644 --- a/machines/porthos/networking.nix +++ b/machines/porthos/networking.nix @@ -31,5 +31,5 @@ }; # Which interface is used to connect to the internet - my.networking.externalInterface = "eth0"; + my.hardware.networking.externalInterface = "eth0"; } diff --git a/modules/default.nix b/modules/default.nix index ddc434a..81ece11 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -8,7 +8,6 @@ ./home.nix ./language.nix ./media.nix - ./networking.nix ./nix.nix ./packages.nix ./sound.nix diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 9c762aa..773a6a7 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -5,5 +5,6 @@ imports = [ ./bluetooth.nix ./ergodox.nix + ./networking.nix ]; } diff --git a/modules/hardware/networking.nix b/modules/hardware/networking.nix index 99e1ef3..f0806fe 100644 --- a/modules/hardware/networking.nix +++ b/modules/hardware/networking.nix @@ -1,9 +1,9 @@ { config, lib, ... }: let - cfg = config.my.networking; + cfg = config.my.hardware.networking; in { - options.my.networking = with lib; { + options.my.hardware.networking = with lib; { externalInterface = mkOption { type = types.nullOr types.str; default = null; diff --git a/services/wireguard.nix b/services/wireguard.nix index fc948f6..977c6c5 100644 --- a/services/wireguard.nix +++ b/services/wireguard.nix @@ -18,7 +18,7 @@ let in lib.filterAttrs shouldConnectToPeer allOthers; - extIface = config.my.networking.externalInterface; + extIface = config.my.hardware.networking.externalInterface; mkInterface = clientAllowedIPs: { listenPort = cfg.port;