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

@ -7,7 +7,6 @@ in
mars = {
imports = builtins.attrValues {
inherit (modules)
mullvad
syncthing
ollama
plasma
@ -17,6 +16,7 @@ in
wayland
searx
flatpak
wireGuard
;
};
};
@ -31,6 +31,7 @@ in
sddm
flatpak
espanso
wireGuard
;
};
};

View file

@ -1,7 +1,8 @@
{ config, flake, ... }:
let
inherit (flake.config.services.instances) wireGuard;
service = wireGuard;
inherit (flake.config.services) instances;
inherit (flake.config.machines.devices) ceres;
service = instances.wireGuard;
wireGuardInterface =
{
secret,
@ -49,6 +50,27 @@ let
in
{
networking = {
hosts = {
${ceres.wireguard.ip0} = [
instances.searx.domains.url0
instances.glance.domains.url0
];
};
wireguard.interfaces = {
wg0 = {
peers = [
{
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
allowedIPs = [
"${ceres.wireguard.ip0}/32"
"${instances.web.localhost.address4}/24"
];
endpoint = "${instances.web.remotehost.address0}:${builtins.toString service.ports.port1}";
persistentKeepalive = 25;
}
];
};
};
wg-quick.interfaces = builtins.listToAttrs (map wireGuardInterface interfaces);
};

View file

@ -23,10 +23,10 @@ in
path = "/home/${user0}/.ssh/known_hosts";
owner = user0;
};
"claude-api-key" = {
path = "/home/${user0}/.config/zed/claude-api-key";
owner = user0;
};
# "claude-api-key" = {
# path = "/home/${user0}/.config/zed/claude-api-key";
# owner = user0;
# };
};
};
}