feat: refactored wireguard and fixed self-hosted bookmarks

This commit is contained in:
Nick 2025-07-06 13:35:31 -05:00
parent 5c1d3e6356
commit cd118791e5
14 changed files with 55 additions and 128 deletions

View file

@ -1,33 +1,15 @@
{ config, flake, ... }:
let
inherit (flake.config.services.instances) wireGuard web;
inherit (flake.config.services) instances;
inherit (flake.config.machines.devices) ceres mars;
inherit (flake.config.services.instances) wireGuard;
inherit (flake.config.machines.devices) mars;
service = wireGuard;
in
{
networking = {
hosts = {
${ceres.wireguard.ip0} = [
instances.searx.domains.url0
instances.glance.domains.url0
];
};
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;
}
];
};
};
};