reorganize
This commit is contained in:
parent
6b9fffb022
commit
c8023afceb
42 changed files with 207 additions and 204 deletions
38
nixos-modules/networking/default.nix
Normal file
38
nixos-modules/networking/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in a new issue