2024-04-13 14:06:35 +00:00
|
|
|
{ lib, machine, ... }: {
|
|
|
|
config = {
|
|
|
|
networking = {
|
|
|
|
domain = "dmz";
|
2024-07-23 20:50:11 +00:00
|
|
|
nftables.enable = lib.mkDefault true;
|
2024-04-13 14:06:35 +00:00
|
|
|
useDHCP = false;
|
|
|
|
|
2024-07-23 20:50:11 +00:00
|
|
|
firewall.enable = lib.mkDefault true;
|
2024-04-13 14:06:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|