nichts/modules/system/os/networking/networking.mod.nix

55 lines
997 B
Nix
Raw Normal View History

{ config, ... }:
let
2024-09-22 19:21:27 +02:00
inherit (config.modules.other.system) username;
in
{
networking = {
enableIPv6 = true;
2025-05-08 19:51:32 +02:00
wireless = {
# INFO: This disables wpa_supplicant,
# I use iwd instead.
enable = false;
# use iwd over wpa_supplicant
iwd = {
enable = true;
settings = {
IPv6 = {
Enabled = true;
};
Settings = {
AutoConnect = true;
};
};
};
};
dhcpcd = {
# faster boot times
wait = "background";
2025-05-08 19:51:32 +02:00
# do not edit resolv.conf
extraConfig = ''
nohook resolv.conf
'';
};
};
2025-05-08 19:51:32 +02:00
# service discovery on a local network via the mDNS/DNS-SD protocol suite
services.avahi = {
enable = true;
2025-05-08 19:51:32 +02:00
nssmdns4 = true;
openFirewall = true;
};
2025-05-08 19:51:32 +02:00
users.users.${username}.extraGroups = [ "networkmanager" ];
2025-05-08 19:51:32 +02:00
# faster boot
systemd = {
network = {
enable = true;
wait-online.enable = false;
};
};
}