43 lines
1.3 KiB
Nix
43 lines
1.3 KiB
Nix
{config, ...}: let
|
|
secrets = config.services.secrets.secrets;
|
|
in {
|
|
networking.wg-quick.interfaces = {
|
|
wg0 = {
|
|
address = ["10.69.42.4/32"];
|
|
listenPort = 51820;
|
|
privateKeyFile = "${secrets.wg_privkey.path}";
|
|
|
|
peers = [
|
|
# hetzner-vm
|
|
{
|
|
publicKey = "UJr+EmUM7KWkIy0nk0JA38ibvcLC++6iuOKkHdrx9Dc=";
|
|
presharedKeyFile = "${secrets.wg_preshared_hetzner-vm.path}";
|
|
allowedIPs = ["10.69.42.1/32"];
|
|
endpoint = "hetzner-vm.servers.genderfucked.monster:51820";
|
|
persistentKeepalive = 25;
|
|
}
|
|
# tablet
|
|
{
|
|
publicKey = "jXA0DeprEaL/ARQ3K81l8xWuUI5C/90DcY3bIfcIjz8=";
|
|
presharedKeyFile = "${secrets.wg_preshared_tablet.path}";
|
|
allowedIPs = ["10.69.42.2/32"];
|
|
}
|
|
# vault
|
|
{
|
|
publicKey = "IGq+WanFM/bKNUkwjO/0AAtDhJLvtvU+mVxH27QyHTc=";
|
|
presharedKeyFile = "${secrets.wg_preshared_vault.path}";
|
|
endpoint = "vault.servers.genderfucked.monster:51820";
|
|
allowedIPs = ["10.69.42.3/32"];
|
|
}
|
|
# iphone8
|
|
{
|
|
publicKey = "2BgT08bDKh8WlFFSeRArI9a1GpFgUyqEApvJy4KgAmw=";
|
|
presharedKeyFile = "${secrets.wg_preshared_iphone8.path}";
|
|
allowedIPs = ["10.69.42.5/32"];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
networking.firewall.allowedUDPPorts = [51820];
|
|
}
|