fixed wireguard for vm

This commit is contained in:
Tassilo - 2022-05-15 18:31:48 +02:00
parent 9c3f89d6c0
commit 7e4efeb2c0
Signed by: revol-xut
GPG Key ID: 4F56FF7759627D07
2 changed files with 15 additions and 1 deletions

View File

@ -196,7 +196,6 @@
specialArgs = { inherit inputs; };
modules = ([
./hosts/staging/configuration.nix
./modules/radio_wireguard_client.nix
microvm.nixosModules.microvm
] ++ data-hoarder-modules);
};

View File

@ -69,6 +69,21 @@
networking.firewall.enable = true;
dvb-dump.domain = "staging.dvb.solutions";
networking.firewall.allowedUDPPorts = [ 51820 ];
networking.wg-quick.interfaces.wg-dvb = {
address = [ "10.13.37.5/32" ];
privateKeyFile = "/root/wg-seckey";
postUp = '' ${pkgs.iputils}/bin/ping -c 10 10.13.37.1 || true '';
peers = [
{
publicKey = "WDvCObJ0WgCCZ0ORV2q4sdXblBd8pOPZBmeWr97yphY=";
allowedIPs = [ "10.13.37.0/24" ];
endpoint = "academicstrokes.com:51820";
persistentKeepalive = 25;
}
];
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions