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

11 lines
307 B
Nix

{config, ...}: {
networking.wireguard.enable = true;
networking.wireguard.interfaces."wg0" = {
listenPort = 51820;
privateKeyFile = config.age.secrets.wgProxyPrivateKey.path;
peers = [{
publicKey = import ./wgServerPublicKey.key.pub;
allowedIPs = ["10.99.0.2/32"];
}];
};
}