31 lines
676 B
Nix
31 lines
676 B
Nix
# 网络配置
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
networking = {
|
|
wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
|
|
|
# Configure network proxy if necessary
|
|
# proxy.default = "http://user:password@proxy:port/";
|
|
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
networkmanager.enable = true;
|
|
|
|
enableIPv6 = false; # disable ipv6
|
|
interfaces.enp0s3 = {
|
|
useDHCP = false;
|
|
ipv4.addresses = [
|
|
{
|
|
address = "10.7.45.130";
|
|
prefixLength = 24;
|
|
}
|
|
];
|
|
};
|
|
defaultGateway = "10.7.45.1";
|
|
nameservers = [
|
|
"119.29.29.29" # DNSPod
|
|
"223.5.5.5" # AliDNS
|
|
];
|
|
};
|
|
}
|