aboutsummaryrefslogblamecommitdiff
path: root/nixops/modules/websites/tools/dav/infcloud.nix
blob: f1204abd1957ee63a36c5955d4ec1a839be897ab (plain) (tree)



















                                                                        
                  

                       

                                                         
                    



                                  









                                   
{ stdenv, fetchzip, ed }:
let
  infcloud = rec {
    webRoot = stdenv.mkDerivation rec {
      version = "0.13.1";
      name = "InfCloud-${version}";
      src = fetchzip {
        url = "https://www.inf-it.com/InfCloud_${version}.zip";
        sha256 = "1fjhs0cj0b9fhf5ysfz281mknmmg1z551bas143sxfcqlpa5aiiq";
      };
      buildPhase = ''
        ./cache_update.sh
        rm config.js
      '';
      installPhase = ''
        cp -a . $out
        ln -s ${./infcloud_config.js} $out/config.js
      '';
      buildInputs = [ ed ];
    };
    apache = rec {
      user = "wwwrun";
      group = "wwwrun";
      webappName = "tools_infcloud";
      root = "/run/current-system/webapps/${webappName}";
      vhostConf = ''
        Alias /carddavmate ${root}
        Alias /caldavzap ${root}
        Alias /infcloud ${root}
        <Directory ${root}>
          AllowOverride All
          Options FollowSymlinks
          Require all granted
          DirectoryIndex index.html
        </Directory>
        '';
    };
  };
in
  infcloud