2022-11-15 13:42:28 +00:00
|
|
|
{ config, ... }:
|
|
|
|
let secrets = config.services.secrets.secrets;
|
2022-11-11 20:53:17 +00:00
|
|
|
in {
|
|
|
|
networking.wg-quick.interfaces = {
|
|
|
|
wg0 = {
|
|
|
|
address = [ "10.69.42.1/32" ];
|
|
|
|
listenPort = 51820;
|
2022-11-15 13:42:28 +00:00
|
|
|
privateKeyFile = "${secrets.wg_privkey.path}";
|
2022-11-11 20:53:17 +00:00
|
|
|
peers = [
|
|
|
|
# tablet
|
|
|
|
{
|
|
|
|
publicKey = "jXA0DeprEaL/ARQ3K81l8xWuUI5C/90DcY3bIfcIjz8=";
|
2022-11-15 13:42:28 +00:00
|
|
|
presharedKeyFile = "${secrets.wg_preshared_tablet.path}";
|
2022-11-11 20:53:17 +00:00
|
|
|
allowedIPs = [ "10.69.42.2/32" ];
|
|
|
|
}
|
|
|
|
# vault
|
|
|
|
{
|
|
|
|
publicKey = "IGq+WanFM/bKNUkwjO/0AAtDhJLvtvU+mVxH27QyHTc=";
|
2022-11-15 13:42:28 +00:00
|
|
|
presharedKeyFile = "${secrets.wg_preshared_vault.path}";
|
2022-11-11 20:53:17 +00:00
|
|
|
endpoint = "vault.servers.genderfucked.monster:51820";
|
|
|
|
allowedIPs = [ "10.69.42.3/32" ];
|
|
|
|
}
|
|
|
|
# storage
|
|
|
|
{
|
|
|
|
publicKey = "biNNeCkjAWi2jUVoL5+1pBtXGa3OFZi4DltB2dqGjGg=";
|
2022-11-15 13:42:28 +00:00
|
|
|
presharedKeyFile = "${secrets.wg_preshared_storage.path}";
|
2022-11-11 20:53:17 +00:00
|
|
|
allowedIPs = [ "10.69.42.4/32" ];
|
|
|
|
}
|
2022-11-12 13:01:43 +00:00
|
|
|
# iphone8
|
|
|
|
{
|
|
|
|
publicKey = "2BgT08bDKh8WlFFSeRArI9a1GpFgUyqEApvJy4KgAmw=";
|
2022-11-15 13:42:28 +00:00
|
|
|
presharedKeyFile = "${secrets.wg_preshared_iphone8.path}";
|
2022-11-12 13:01:43 +00:00
|
|
|
allowedIPs = [ "10.69.42.5/32" ];
|
|
|
|
}
|
2022-11-11 20:53:17 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
|
|
|
}
|