Skip to content
Snippets Groups Projects
grid.nix 1.72 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Load the helper function and call it with arguments tailored for the local
    # grid.  It will make the morph configuration for us.  We share this function
    # with the production grid and have one fewer possible point of divergence.
    
    import ../../lib/make-grid.nix rec {
    
      name = "LocalDev";
      config = ./config.json;
      nodes = cfg:
      let
        sshUsers = import ../../../../PrivateStorageSecrets/localdev-users.nix;
    
        "payments1" = import ../../lib/make-issuer.nix (rec {
    
          publicIPv4 = "192.168.67.21";
    
    Florian Sesser's avatar
    Florian Sesser committed
          monitoringvpnIPv4 = "172.23.23.11";
    
          inherit sshUsers;
          hardware = import ./virtual-hardware.nix ({ inherit publicIPv4; });
          stateVersion = "19.03";
        } // cfg);
    
        "storage1" = import ../../lib/make-testing.nix (rec {
          publicIPv4 = "192.168.67.22";
    
          monitoringvpnIPv4 = "172.23.23.12";
    
          inherit sshUsers;
          hardware = import ./virtual-hardware.nix ({ inherit publicIPv4; });
          stateVersion = "19.09";
        } // cfg);
    
        "storage2" = import ../../lib/make-testing.nix (rec {
          publicIPv4 = "192.168.67.23";
    
          monitoringvpnIPv4 = "172.23.23.13";
    
          inherit sshUsers;
          hardware = import ./virtual-hardware.nix ({ inherit publicIPv4; });
          stateVersion = "19.09";
        } // cfg);
    
    Florian Sesser's avatar
    Florian Sesser committed
    
        "monitoring1" = import ../../lib/make-monitoring.nix (rec {
          publicIPv4 = "192.168.67.24";
    
    Florian Sesser's avatar
    Florian Sesser committed
          monitoringvpnIPv4 = "172.23.23.1";
    
          vpnClientIPs = builtins.filter (x: x != null) (map (x: lib.attrByPath (lib.splitString "." "services.private-storage.monitoring.vpn.client.ip") null x) (builtins.attrValues nodes));
    
    Florian Sesser's avatar
    Florian Sesser committed
          inherit sshUsers;
          hardware = import ./virtual-hardware.nix ({ inherit publicIPv4; });
          stateVersion = "19.09";
        } // cfg);