feat: wireguard test

This commit is contained in:
Nick 2025-07-01 17:13:29 -05:00
parent f9e0ffb400
commit d73b1c5abe
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
dig
;
};
}

View file

@ -1,11 +1,15 @@
{ config, flake, ... }: { config, flake, ... }:
let let
inherit (flake.config.services.instances) wireGuard web; inherit (flake.config.services.instances) wireGuard web;
inherit (flake.config.services) instances;
inherit (flake.config.machines.devices) ceres mars; inherit (flake.config.machines.devices) ceres mars;
service = wireGuard; service = wireGuard;
in in
{ {
networking = { networking = {
hosts = {
${ceres.wireguard.ip0} = [ instances.searx.domains.url0 ];
};
wireguard.interfaces = { wireguard.interfaces = {
wg0 = { wg0 = {
ips = [ "${mars.wireguard.ip0}/32" ]; ips = [ "${mars.wireguard.ip0}/32" ];
@ -16,7 +20,6 @@ in
allowedIPs = [ allowedIPs = [
"${ceres.wireguard.ip0}/32" "${ceres.wireguard.ip0}/32"
"${web.localhost.address4}/24" "${web.localhost.address4}/24"
"${web.remotehost.address0}/32"
]; ];
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}"; endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
persistentKeepalive = 25; persistentKeepalive = 25;