configuration.nix/hosts/skipper/wireguard.nix
Adithya Nair c034a10aef
Revert "remove wireguard stuff"
This reverts commit 9b8ec24c63.
This reverts commit ec04addf62.
2023-10-10 18:29:53 +05:30

23 lines
446 B
Nix

{
config,
secrets,
...
}: let
inherit (secrets.wireguard_config) peers;
in {
networking.wireguard = {
enable = true;
interfaces = {
wg0 = {
ips = peers."${config.networking.hostName}".allowedIPs;
privateKeyFile = "/etc/wireguard/private.key";
generatePrivateKeyFile = true;
listenPort = 51820;
peers = with peers; [
Proxy
Rico2
];
};
};
};
}