configuration.nix/hosts/rico2/wireguard.nix

23 lines
419 B
Nix
Raw Normal View History

2023-10-08 15:36:04 +05:30
{
config,
secrets,
...
}: let
inherit (secrets.wireguard_config) peers Proxy Skipper;
in {
networking.wireguard = {
enable = true;
interfaces = {
wg0 = {
inherit (peers."${config.networking.hostName}") ips;
privateKeyFile = "/etc/wireguard/private.key";
generatePrivateKeyFile = true;
peers = [
Proxy
Skipper
];
};
};
};
}