replace networkmanager with systemd-networkd (again)

This commit is contained in:
Adithya 2024-12-07 19:17:49 +05:30
parent 46c8dca034
commit f99f284869
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
2 changed files with 73 additions and 11 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ...}: { pkgs, ... }:
let let
theme = { theme = {
name = "Dracula"; name = "Dracula";

View file

@ -7,6 +7,78 @@
fallbackDns = [ ]; fallbackDns = [ ];
}; };
systemd = {
network = {
enable = true;
wait-online.enable = true;
networks = {
"20-virbr" = {
matchConfig = {
Name = "virbr*";
Type = "bridge";
};
linkConfig = {
Unmanaged = true;
};
};
"21-docker" = {
matchConfig = {
Name = "docker*";
Type = "bridge";
};
linkConfig = {
Unmanaged = true;
};
};
"22-veth" = {
matchConfig = {
Name = "veth*";
Type = "ether";
};
linkConfig = {
Unmanaged = true;
};
};
"40-ether" = {
enable = true;
matchConfig = {
Type = "ether";
};
networkConfig = {
DHCP = "yes";
};
dhcpV4Config = {
UseDomains = true;
RouteMetric = 100;
};
ipv6AcceptRAConfig = {
RouteMetric = 100;
};
};
"40-wireless" = {
enable = true;
matchConfig = {
Type = "wlan";
};
networkConfig = {
DHCP = "yes";
IgnoreCarrierLoss = "3s";
};
dhcpV4Config = {
UseDomains = true;
RouteMetric = 600;
};
ipv6AcceptRAConfig = {
RouteMetric = 600;
};
linkConfig = {
RequiredForOnline = "routable";
};
};
};
};
};
networking = { networking = {
nameservers = [ nameservers = [
"10.10.10.1" "10.10.10.1"
@ -34,16 +106,6 @@
]; ];
}; };
networkmanager = {
enable = true;
dhcp = "dhcpcd";
dns = "systemd-resolved";
wifi = {
backend = "iwd";
powersave = false;
};
};
wireless.iwd = { wireless.iwd = {
enable = true; enable = true;
settings = { settings = {