39 lines
777 B
Nix
39 lines
777 B
Nix
|
{ lib, machine, ... }: {
|
||
|
config = {
|
||
|
networking = {
|
||
|
domain = "dmz";
|
||
|
nftables.enable = true;
|
||
|
useDHCP = false;
|
||
|
|
||
|
firewall = {
|
||
|
enable = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
systemd.network = {
|
||
|
enable = true;
|
||
|
|
||
|
networks = lib.attrsets.mergeAttrsList [
|
||
|
(lib.optionalAttrs (! machine.isRaspberryPi) {
|
||
|
"30-main-nic" = {
|
||
|
matchConfig.Name = "en*";
|
||
|
|
||
|
networkConfig = {
|
||
|
DHCP = "yes";
|
||
|
};
|
||
|
};
|
||
|
})
|
||
|
(lib.optionalAttrs machine.isRaspberryPi {
|
||
|
"30-main-nic" = {
|
||
|
matchConfig.Name = "end*";
|
||
|
networkConfig = {
|
||
|
IPv6AcceptRA = true;
|
||
|
DHCP = "yes";
|
||
|
};
|
||
|
};
|
||
|
})
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
}
|