diff --git a/hosts/skipper/default.nix b/hosts/skipper/default.nix index b534f28..ce69fa1 100644 --- a/hosts/skipper/default.nix +++ b/hosts/skipper/default.nix @@ -1,12 +1,9 @@ -{ - lib, - pkgs, - ... -}: { +{pkgs, ...}: { imports = [ ./hardware ./programs ./services + ./network.nix ./persistence.nix ./plymouth.nix ./rollback.nix @@ -16,7 +13,6 @@ ./virtualisation.nix ]; - boot.binfmt.emulatedSystems = ["aarch64-linux"]; console.useXkbConfig = true; environment.sessionVariables = { @@ -57,24 +53,6 @@ location.provider = "geoclue2"; - networking = { - hostName = "Skipper"; - networkmanager = { - enable = true; - dns = "systemd-resolved"; - wifi = { - backend = "iwd"; - powersave = false; - }; - extraConfig = '' - [device] - wifi.iwd.autoconnect=yes - ''; - }; - useDHCP = lib.mkDefault false; - wireless.iwd.enable = true; - }; - sound.enable = true; time.timeZone = "Asia/Kolkata"; diff --git a/hosts/skipper/network.nix b/hosts/skipper/network.nix new file mode 100644 index 0000000..6f6996a --- /dev/null +++ b/hosts/skipper/network.nix @@ -0,0 +1,32 @@ +_: { + networking = { + hostName = "Skipper"; + wireless.iwd = { + enable = true; + settings = { + General = { + AddressRandomization = "network"; + }; + Settings = { + AutoConnect = true; + }; + }; + }; + }; + + systemd.network = { + enable = true; + networks.wifi = { + enable = true; + matchConfig = { + Name = "wlan0"; + }; + networkConfig = { + DHCP = "yes"; + }; + linkConfig = { + RequiredForOnline = "yes"; + }; + }; + }; +}