nix/nixos/common/modules/networking.nix
2024-03-21 08:10:29 +09:00

23 lines
446 B
Nix

{lib, pkgs, config, ...}: {
# Enable networking with NetworkManager
networking = {
networkmanager = {
enable = true;
};
useDHCP = lib.mkDefault true;
enableIPv6 = lib.mkForce false;
firewall = {
enable = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
};
};
boot.kernel.sysctl = {
"net.ipv6.conf.all.disable_ipv6" = true;
};
boot.kernelParams = [ "ipv6.disable=1" ];
}