mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 01:59:19 +08:00
devices.srv1.node2: fix network
This commit is contained in:
parent
52b9ed4441
commit
024598227a
@ -9,7 +9,7 @@ inputs:
|
|||||||
nixpkgs.march = "broadwell";
|
nixpkgs.march = "broadwell";
|
||||||
networking.networkd.static =
|
networking.networkd.static =
|
||||||
{
|
{
|
||||||
eno1 = { ip = "192.168.1.12"; mask = 24; gateway = "192.168.1.1"; dns = "192.168.1.1"; };
|
br0 = { ip = "192.168.1.12"; mask = 24; gateway = "192.168.1.1"; dns = "192.168.1.1"; };
|
||||||
eno2 = { ip = "192.168.178.3"; mask = 24; };
|
eno2 = { ip = "192.168.178.3"; mask = 24; };
|
||||||
};
|
};
|
||||||
cluster.nodeType = "worker";
|
cluster.nodeType = "worker";
|
||||||
@ -38,10 +38,7 @@ inputs:
|
|||||||
# make slurm sub process to be able to communicate with the master
|
# make slurm sub process to be able to communicate with the master
|
||||||
networking.firewall.trustedInterfaces = [ "eno2" ];
|
networking.firewall.trustedInterfaces = [ "eno2" ];
|
||||||
# add a bridge for kvm
|
# add a bridge for kvm
|
||||||
networking =
|
# 设置桥接之后,不能再给eno1配置ip,需要转而给 br0 配置ip
|
||||||
{
|
networking.bridges.br0.interfaces = [ "eno1" ];
|
||||||
bridges.br0.interfaces = [ "eno1" ];
|
|
||||||
interfaces.br0.useDHCP = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -75,10 +75,10 @@ inputs:
|
|||||||
(builtins.map
|
(builtins.map
|
||||||
(network:
|
(network:
|
||||||
{
|
{
|
||||||
name = "10-${network.ssid}";
|
name = "10-${network}";
|
||||||
value =
|
value =
|
||||||
{
|
{
|
||||||
matchConfig.Name = network.ssid;
|
matchConfig.Name = network;
|
||||||
networkConfig = { DHCP = "yes"; IPv6AcceptRA = true; };
|
networkConfig = { DHCP = "yes"; IPv6AcceptRA = true; };
|
||||||
linkConfig.RequiredForOnline = "routable";
|
linkConfig.RequiredForOnline = "routable";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user