switch to systemd-networkd

This commit is contained in:
Adithya 2023-07-20 20:40:19 +05:30
parent 8d21ac5bf5
commit 027834dc59
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 34 additions and 24 deletions

View file

@ -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";

32
hosts/skipper/network.nix Normal file
View file

@ -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";
};
};
};
}