modularizing of vps ips

This commit is contained in:
2025-09-16 14:56:42 -06:00
parent cfca87a703
commit 17b2d98b6c
8 changed files with 29 additions and 16 deletions

View File

@@ -5,7 +5,7 @@
../../config/base.nix
../../config/stylix.nix
];
my = import ./toggles.nix;
my = import ./toggles.nix { inherit config; };
sops.secrets."vps/home/private".sopsFile = ../../secrets/wireguard.yaml;
networking =
let
@@ -42,13 +42,13 @@
interfaces.wg0.allowedTCPPorts = [ 8081 ];
};
wireguard.interfaces.wg0 = {
ips = [ "10.77.0.2/32" ];
ips = [ "${config.my.wgServerIp}/32" ];
privateKeyFile = config.sops.secrets."vps/home/private".path;
peers = [
{
publicKey = "dFbiSekBwnZomarcS31o5+w6imHjMPNCipkfc2fZ3GY=";
endpoint = "51.222.141.104:51820";
allowedIPs = [ "10.77.0.1/32" ];
allowedIPs = [ "${config.my.wgVpsIp}/32" ];
persistentKeepalive = 25;
}
];