dotfiles/nixos/systems/gooseberry/networking.nix

35 lines
636 B
Nix
Raw Normal View History

{
pkgs,
lib,
secret,
...
}: let
in {
networking = {
hostName = "gooseberry";
useDHCP = false;
interfaces.eth0.useDHCP = true;
firewall = {
enable = true;
allowedUDPPorts = [
6666
];
};
interfaces."eth1".ipv4.addresses = [
{
address = secret.network.ips.gooseberry.ipmi or "";
prefixLength = 30;
}
];
wireguard.interfaces."wg0" =
secret.wireguard."gooseberry" or {privateKey = "";};
};
services.udev.extraRules = ''
ATTR{address}=="b8:27:eb:ef:f4:c3", NAME="eth0"
ATTR{address}=="c8:4d:44:21:27:17", NAME="eth1"
'';
}