From e34a85b940405d34ba23f865de4b2bbe0a83ce02 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 11 Nov 2023 23:59:42 +0530 Subject: [PATCH] switch to network-manager on rico1 and rico2 --- hosts/rico1/network.nix | 42 +++++++++++++++++++-------------------- hosts/rico2/network.nix | 42 +++++++++++++++++++-------------------- hosts/skipper/network.nix | 3 +++ 3 files changed, 43 insertions(+), 44 deletions(-) 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 = {