ark/hosts/tkaronto/modules/wireguard.nix
2023-05-05 01:54:16 +03:00

11 lines
337 B
Nix

{config, ...}: {
networking.wireguard.enable = true;
networking.wireguard.interfaces."wg0" = {
privateKeyFile = config.age.secrets.wgServerPrivateKey.path;
peers = [{
publicKey = import ./wgProxyPublicKey.key.pub;
allowedIPs = ["10.99.0.1/32"];
endpoint = "${import ./wgProxyPublicIp}:51820";
}];
};
}