nix/nixos/common/modules/networking.nix
2024-10-18 15:34:49 +02:00

28 lines
531 B
Nix

{lib, ... }: {
# Enable networking with NetworkManager
networking = {
networkmanager = {
enable = true;
logLevel = "INFO";
};
useDHCP = lib.mkDefault true;
enableIPv6 = true;
firewall = {
enable = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
};
};
# Enable NTP
services.timesyncd = {
enable = true;
servers = [
"0.nixos.pool.ntp.org"
"1.nixos.pool.ntp.org"
"2.nixos.pool.ntp.org"
"3.nixos.pool.ntp.org"
];
};
}