mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-09 05:14:41 -05:00
feat: refactored wireguard and fixed self-hosted bookmarks
This commit is contained in:
parent
5c1d3e6356
commit
cd118791e5
14 changed files with 55 additions and 128 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue