调整项目结构和readme
This commit is contained in:
42
profiles/apollo/nixos/network.nix
Normal file
42
profiles/apollo/nixos/network.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ config, pkgs, hostname, ... }: {
|
||||
networking = {
|
||||
hostId = "6fa8b74d";
|
||||
hostName = "${hostname}";
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
ensureProfiles.profiles = {
|
||||
"eno1" = {
|
||||
connection = {
|
||||
id = "eno1";
|
||||
type = "ethernet"; # 有线连接
|
||||
autoconnect = true; # 自动连接
|
||||
};
|
||||
ipv4 = {
|
||||
method = "manual"; # 设置为手动配置 IPv4
|
||||
addresses = "10.7.43.10/24,10.7.43.30";
|
||||
# 如果需要,可以添加 DNS 服务器
|
||||
# dns = [ "10.7.43.1" "8.8.8.8" ];
|
||||
};
|
||||
ipv6 = {
|
||||
method = "auto"; # 设置为自动配置 IPv6 (动态)
|
||||
};
|
||||
ethernet = {
|
||||
wake-on-lan=64;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
interfaces = {
|
||||
eno1 = {
|
||||
wakeOnLan = {
|
||||
enable = true;
|
||||
policy = [
|
||||
"magic"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user