Torjus Håkestad 38c2fbca2c
Some checks failed
Run nix flake check / flake-check (push) Failing after 4m43s
Periodic flake update / flake-update (push) Successful in 2m7s
Add useNetworkd to wireguard
2025-05-23 01:35:31 +02:00

34 lines
824 B
Nix

{ config, ... }:
{
sops.secrets.wireguard_private_key = {
sopsFile = ../../secrets/http-proxy/wireguard.yaml;
key = "wg_private_key";
};
networking.wireguard = {
enable = true;
useNetworkd = true;
interfaces = {
wg0 = {
ips = [ "10.69.222.3/24" ];
mtu = 1384;
listenPort = 51820;
privateKeyFile = config.sops.secrets.wireguard_private_key.path;
peers = [
{
name = "docker2.t-juice.club";
endpoint = "docker2.t-juice.club:51820";
publicKey = "32Rb13wExcy8uI92JTnFdiOfkv0mlQ6f181WA741DHs=";
allowedIPs = [ "10.69.222.0/24" ];
persistentKeepalive = 25;
}
];
};
};
};
# monitoring
services.prometheus.exporters.wireguard = {
enable = true;
};
}