mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 21:42:16 -06:00
29 lines
704 B
Nix
Executable file
29 lines
704 B
Nix
Executable file
{ flake, ... }:
|
|
let
|
|
inherit (flake.config.services) instances;
|
|
inherit (flake.config.machines.devices) ceres;
|
|
service = instances.wireGuard;
|
|
in
|
|
{
|
|
networking = {
|
|
hosts = {
|
|
${ceres.wireguard.ip0} = [
|
|
];
|
|
};
|
|
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;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|