diff --git a/hosts/rico1/network.nix b/hosts/rico1/network.nix index 5e1b6f0..64c465f 100644 --- a/hosts/rico1/network.nix +++ b/hosts/rico1/network.nix @@ -2,33 +2,31 @@ imports = [ ./wireguard.nix ]; networking = { hostName = "Rico1"; + + networkmanager = { + enable = true; + dns = "systemd-resolved"; + wifi = { + backend = "iwd"; + powersave = false; + }; + }; + useDHCP = lib.mkDefault false; - }; - services.resolved.enable = true; - - systemd.network = { - enable = true; - networks = { - "40-ether" = { - enable = true; - matchConfig = { - Type = "ether"; + wireless.iwd = { + enable = true; + settings = { + General = { + AddressRandomization = "network"; + EnableNetworkConfiguration = false; }; - networkConfig = { - DHCP = "yes"; - IgnoreCarrierLoss = "3s"; - }; - dhcpV4Config = { - UseDomains = true; - }; - ipv6AcceptRAConfig = { - UseDomains = true; - }; - linkConfig = { - RequiredForOnline = "yes"; + Settings = { + AutoConnect = "yes"; }; }; }; }; + + services.resolved.enable = true; } diff --git a/hosts/rico2/network.nix b/hosts/rico2/network.nix index e0ed736..4be8410 100644 --- a/hosts/rico2/network.nix +++ b/hosts/rico2/network.nix @@ -2,33 +2,31 @@ imports = [ ./wireguard.nix ]; networking = { hostName = "Rico2"; + + networkmanager = { + enable = true; + dns = "systemd-resolved"; + wifi = { + backend = "iwd"; + powersave = false; + }; + }; + useDHCP = lib.mkDefault false; - }; - services.resolved.enable = true; - - systemd.network = { - enable = true; - networks = { - "40-ether" = { - enable = true; - matchConfig = { - Type = "ether"; + wireless.iwd = { + enable = true; + settings = { + General = { + AddressRandomization = "network"; + EnableNetworkConfiguration = false; }; - networkConfig = { - DHCP = "yes"; - IgnoreCarrierLoss = "3s"; - }; - dhcpV4Config = { - UseDomains = true; - }; - ipv6AcceptRAConfig = { - UseDomains = true; - }; - linkConfig = { - RequiredForOnline = "yes"; + Settings = { + AutoConnect = "yes"; }; }; }; }; + + services.resolved.enable = true; } diff --git a/hosts/skipper/network.nix b/hosts/skipper/network.nix index 568c7e6..0947805 100644 --- a/hosts/skipper/network.nix +++ b/hosts/skipper/network.nix @@ -2,6 +2,7 @@ imports = [ ./wireguard.nix ]; networking = { hostName = "Skipper"; + networkmanager = { enable = true; dns = "systemd-resolved"; @@ -10,7 +11,9 @@ powersave = false; }; }; + useDHCP = lib.mkDefault false; + wireless.iwd = { enable = true; settings = {