Skip to content
Snippets Groups Projects

Fix VPN key generation script

Merged Florian Sesser requested to merge fix-vpn-key-rotation into develop
1 file
+ 4
6
Compare changes
  • Side-by-side
  • Inline
+ 4
6
@@ -9,11 +9,9 @@
{ pathToGrid }:
let
grid = import pathToGrid;
vpnConfig = node: node.services.private-storage.monitoring.vpn or null;
vpnClientIP = node: (vpnConfig node).client.ip or null;
vpnServerIP = node: (vpnConfig node).server.ip or null;
in
vpnIP = node: node.config.grid.monitoringvpnIPv4 or null; # "or null" since "network" in grid doesn't have a monitoringIPv4
in rec
{
"serverIP" = vpnServerIP grid.monitoring;
"clientIPs" = builtins.filter (x: x != null) (map vpnClientIP (builtins.attrValues grid));
serverIP = vpnIP grid.monitoring;
clientIPs = builtins.filter (x: x != serverIP && x != null) (map vpnIP (builtins.attrValues grid));
}
Loading