2023-11-04 16:12:45 +05:30
|
|
|
{ config
|
|
|
|
, secrets
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
2023-10-11 12:10:06 +05:30
|
|
|
inherit (secrets.wireguard_config) peers;
|
2023-11-04 16:12:45 +05:30
|
|
|
in
|
|
|
|
{
|
|
|
|
networking.firewall.trustedInterfaces = [ "wg0" ];
|
2023-10-11 12:10:06 +05:30
|
|
|
networking.wireguard = {
|
|
|
|
enable = true;
|
|
|
|
interfaces = {
|
|
|
|
wg0 = {
|
2023-11-12 15:04:59 +05:30
|
|
|
ips = [
|
2024-01-04 21:51:21 +05:30
|
|
|
"10.8.10.11/24"
|
2024-01-04 21:51:15 +05:30
|
|
|
"fdd9:69ae:9703::4/64"
|
2023-11-12 15:04:59 +05:30
|
|
|
];
|
|
|
|
listenPort = 51821;
|
2023-10-11 12:10:06 +05:30
|
|
|
privateKeyFile = "/etc/wireguard/private.key";
|
|
|
|
generatePrivateKeyFile = true;
|
|
|
|
peers = with peers; [
|
2023-11-12 15:04:59 +05:30
|
|
|
Proxy
|
2023-10-11 12:10:06 +05:30
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|