move palatine-hill networking to its own module, switch to systemd-networkd
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
35
systems/palatine-hill/networking.nix
Normal file
35
systems/palatine-hill/networking.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
|
||||
networking = {
|
||||
hostId = "dc2f9781";
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks = {
|
||||
# enable DHCP for primary ethernet adapter
|
||||
"10-lan" = {
|
||||
matchConfig.Name = "eno1";
|
||||
networkConfig.DHCP = "ipv4";
|
||||
address = [ "192.168.76.2/32" ];
|
||||
routes = [ { routeConfig.Gateway = "192.168.76.1"; } ];
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
# default lan settings
|
||||
"60-def-lan" = {
|
||||
matchConfig.Name = "eno*";
|
||||
networkConfig.DHCP = "ipv4";
|
||||
routes = [ { routeConfig.Gateway = "192.168.76.1"; } ];
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user