2023-07-18 20:40:57 +02:00
|
|
|
{
|
2024-03-02 22:05:30 +01:00
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
secret,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
in {
|
2023-07-18 20:40:57 +02:00
|
|
|
networking = {
|
|
|
|
hostName = "gooseberry";
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
2024-05-09 18:11:11 +02:00
|
|
|
firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowedUDPPorts = [
|
|
|
|
6666
|
|
|
|
];
|
|
|
|
};
|
2023-07-19 01:39:52 +02:00
|
|
|
|
2024-03-02 22:05:30 +01:00
|
|
|
interfaces."eth1".ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = secret.network.ips.gooseberry.ipmi or "";
|
|
|
|
prefixLength = 30;
|
|
|
|
}
|
|
|
|
];
|
2024-05-09 18:11:11 +02:00
|
|
|
|
|
|
|
wireguard.interfaces."wg0" =
|
|
|
|
secret.wireguard."gooseberry" or {privateKey = "";};
|
2023-07-18 20:40:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
ATTR{address}=="b8:27:eb:ef:f4:c3", NAME="eth0"
|
|
|
|
ATTR{address}=="c8:4d:44:21:27:17", NAME="eth1"
|
|
|
|
'';
|
|
|
|
}
|