pre upgrade config

This commit is contained in:
stubbfel
2018-10-25 20:33:25 +02:00
parent 81bbdc3757
commit e0d60d3e70
3 changed files with 29 additions and 0 deletions

View File

@@ -12,5 +12,6 @@
./resilio.nix
./sks.nix
./gitea.nix
# ./wireguard.nix
];
}

1
services/wg0.key Normal file
View File

@@ -0,0 +1 @@
qGHCeu53Sf6I8FUemPb36/nWbteef6H1Iz6BvE8/ek8=

27
services/wireguard.nix Normal file
View File

@@ -0,0 +1,27 @@
{ config, pkgs, ... }:
{
boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
environment.systemPackages = [ pkgs.wireguard ];
networking.firewall.allowedTCPPorts = [ 51820 ];
networking.firewall.allowedUDPPorts = [ 51820 ];
networking.wireguard.interfaces.wg0 = {
listenPort = 51820;
privateKeyFile = "/etc/nixos/services/wg0.key";
ips = [ "192.168.43.1/24" ];
peers = [
{
allowedIPs = ["192.168.43.2"];
publicKey = "vGuxJHw7I1gSQd7SThDu758ynR3AKVXjgqtNIUnMBEg=";
persistentKeepalive = 25;
}
{
allowedIPs = ["192.168.43.3"];
publicKey = "YQ/SN8ZauuvWKJp+cT2JPP7sUUJai4ujubAZNZkZAAU=";
persistentKeepalive = 25;
}
];
};
}