mirror of
https://github.com/dump-dvb/nix-config.git
synced 2024-06-08 09:14:11 +02:00
38 lines
753 B
Nix
38 lines
753 B
Nix
|
{ config, ... }:
|
||
|
let
|
||
|
port = 51820;
|
||
|
in
|
||
|
{
|
||
|
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||
|
|
||
|
networking.firewall.allowedUDPPorts = [ port ];
|
||
|
|
||
|
deployment-dvb.net = {
|
||
|
iface.uplink = {
|
||
|
name = "ens3";
|
||
|
mac = mac_addr;
|
||
|
matchOn = "mac";
|
||
|
useDHCP = false;
|
||
|
addr4 = "172.20.73.70/25";
|
||
|
dns = [ "172.20.73.8" "9.9.9.9" ];
|
||
|
routes = [
|
||
|
{
|
||
|
routeConfig = {
|
||
|
Gateway = "172.20.73.1";
|
||
|
GatewayOnLink = true;
|
||
|
Destination = "0.0.0.0/0";
|
||
|
};
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
|
||
|
wg = {
|
||
|
addr4 = "10.13.37.6";
|
||
|
prefix4 = 24;
|
||
|
privateKeyFile = config.sops.secrets.wg-seckey.path;
|
||
|
publicKey = "zaMM8Fa/PK0Fq4pYl0KAyOYkOjHBrZ4RVgfqqFIzq3I=";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
}
|