ark/hosts/wolumonde/modules/wireguard.nix

11 lines
307 B
Nix
Raw Normal View History

2023-05-05 01:54:16 +03:00
{config, ...}: {
networking.wireguard.enable = true;
networking.wireguard.interfaces."wg0" = {
listenPort = 51820;
2023-05-05 03:30:46 +03:00
privateKeyFile = config.age.secrets.wgWolumondeKey.path;
2023-05-05 01:54:16 +03:00
peers = [{
2023-05-05 03:50:25 +03:00
publicKey = builtins.readFile ./wgTkarontoKey.pub;
2023-05-05 01:54:16 +03:00
allowedIPs = ["10.99.0.2/32"];
}];
};
}