feat: wireguard test

This commit is contained in:
Nick 2025-07-03 19:40:32 -05:00
parent 4344fa207a
commit 44865ba36c
6 changed files with 68 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{ config, flake, ... }:
let
inherit (flake.config.services.instances) wireGuard searx;
inherit (flake.config.machines.devices) mars ceres;
inherit (flake.config.machines.devices) mars deimos ceres;
service = wireGuard;
in
{
@ -32,10 +32,17 @@ in
listenPort = service.ports.port1;
privateKeyFile = config.sops.secrets."${service.name}-private".path;
peers = [
# if you need to create a new key pair
# wg genkey | save --raw --force privatekey
# open privatekey | wg pubkey | save --raw --force publickey
{
publicKey = "9zfRPxkxTLHM9tABC8lIaDMrzdjcF2l1mtG82uqGKUQ=";
allowedIPs = [ "${mars.wireguard.ip0}/32" ];
}
{
publicKey = "hKbvOlvKdWAlq45rfV3ggwOI8xqiqVWweXV+2GQx/0I=";
allowedIPs = [ "${deimos.wireguard.ip0}/32" ];
}
];
};
};