feat: wireguard test

This commit is contained in:
Nick 2025-07-01 16:08:54 -05:00
parent 8b9ece1b4e
commit 1d9097408c
5 changed files with 24 additions and 59 deletions

View file

@ -5,30 +5,23 @@ let
service = wireGuard;
in
{
networking.wg-quick.interfaces = {
wg0 = {
address = [
"${mars.wireguard.ip0}/24"
"fdc9:281f:04d7:9ee9::2/64"
];
dns = [
"${ceres.wireguard.ip0}"
"fdc9:281f:04d7:9ee9::1"
];
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
peers = [
{
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
presharedKeyFile = config.sops.secrets."${service.name}-public".path;
allowedIPs = [
"192.168.1.0/24"
"0.0.0.0/0"
"::/0"
];
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
persistentKeepalive = 25;
}
];
networking = {
wireguard.interfaces = {
wg0 = {
ips = [ "${mars.wireguard.ip0}/32" ];
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
peers = [
{
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
allowedIPs = [
"${ceres.wireguard.ip0}/32"
"${web.localhost.address4}/24"
];
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
persistentKeepalive = 25;
}
];
};
};
};
@ -50,7 +43,6 @@ in
[
"mars-private"
"mars-public"
"public"
]
);
};