nix/system/Network.nix

27 lines
552 B
Nix
Raw Normal View History

2024-11-28 22:28:13 +03:00
{ ... }: {
2024-11-28 22:06:31 +03:00
# REF: https://nixos.wiki/wiki/Systemd-networkd
2024-11-28 22:28:13 +03:00
# SEE: man 5 systemd.network
2024-11-28 22:06:31 +03:00
systemd.network = {
enable = true;
2024-11-28 22:28:13 +03:00
wait-online.enable = false; # HACK: So we can use both NM and networkd.
2024-11-28 22:06:31 +03:00
};
2024-11-04 04:37:29 +03:00
networking = {
2024-11-28 22:06:31 +03:00
dhcpcd.enable = false;
2024-11-29 04:47:05 +03:00
useDHCP = false;
useNetworkd = true;
2024-11-29 01:44:48 +03:00
networkmanager = {
enable = true;
unmanaged = [
2024-11-29 04:47:05 +03:00
"type:bridge"
"type:ethernet"
"type:loopback"
# "type:wireguard"
2024-11-29 01:44:48 +03:00
];
};
2024-11-04 04:37:29 +03:00
};
2024-11-29 04:47:05 +03:00
# NOTE: Debugging.
# systemd.services."systemd-networkd".environment.SYSTEMD_LOG_LEVEL = "debug";
}