34 lines
1 KiB
Nix
34 lines
1 KiB
Nix
|
{ ... }:
|
||
|
let secrets-db = (import ../secrets-db.nix { });
|
||
|
in {
|
||
|
networking.wg-quick.interfaces = {
|
||
|
wg0 = {
|
||
|
address = [ "10.69.42.1/32" ];
|
||
|
listenPort = 51820;
|
||
|
privateKeyFile = "${secrets-db.wg_privkey.path}";
|
||
|
peers = [
|
||
|
# tablet
|
||
|
{
|
||
|
publicKey = "jXA0DeprEaL/ARQ3K81l8xWuUI5C/90DcY3bIfcIjz8=";
|
||
|
presharedKeyFile = "${secrets-db.wg_preshared_tablet.path}";
|
||
|
allowedIPs = [ "10.69.42.2/32" ];
|
||
|
}
|
||
|
# vault
|
||
|
{
|
||
|
publicKey = "IGq+WanFM/bKNUkwjO/0AAtDhJLvtvU+mVxH27QyHTc=";
|
||
|
presharedKeyFile = "${secrets-db.wg_preshared_vault.path}";
|
||
|
endpoint = "vault.servers.genderfucked.monster:51820";
|
||
|
allowedIPs = [ "10.69.42.3/32" ];
|
||
|
}
|
||
|
# storage
|
||
|
{
|
||
|
publicKey = "biNNeCkjAWi2jUVoL5+1pBtXGa3OFZi4DltB2dqGjGg=";
|
||
|
presharedKeyFile = "${secrets-db.wg_preshared_storage.path}";
|
||
|
allowedIPs = [ "10.69.42.4/32" ];
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||
|
}
|