Files
nix-config/modules/nixos/base/networking.nix
2025-07-01 16:20:52 +08:00

26 lines
715 B
Nix

{
# Network discovery, mDNS
# With this enabled, you can access your machine at <hostname>.local
# it's more convenient than using the IP address.
# https://avahi.org/
services.avahi = {
enable = true;
nssmdns4 = true;
publish = {
enable = true;
domain = true;
userServices = true;
};
};
# Use an NTP server located in the mainland of China to synchronize the system time
networking.timeServers = [
"ntp.aliyun.com" # Aliyun NTP Server
"ntp.tencent.com" # Tencent NTP Server
];
# dynamically update /etc/hosts for testing
# Note that changes made in this way will be discarded when switching configurations.
environment.etc.hosts.mode = "0644";
}