]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - nixops/modules/websites/tools/dav/infcloud.nix
Refactor mastodon service module
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / dav / infcloud.nix
CommitLineData
1635a4ae
IB
1{ stdenv, fetchzip, ed }:
2let
3 infcloud = rec {
4 webRoot = stdenv.mkDerivation rec {
5 version = "0.13.1";
6 name = "InfCloud-${version}";
7 src = fetchzip {
8 url = "https://www.inf-it.com/InfCloud_${version}.zip";
9 sha256 = "1fjhs0cj0b9fhf5ysfz281mknmmg1z551bas143sxfcqlpa5aiiq";
10 };
11 buildPhase = ''
12 ./cache_update.sh
13 rm config.js
14 '';
15 installPhase = ''
16 cp -a . $out
17 ln -s ${./infcloud_config.js} $out/config.js
18 '';
19 buildInputs = [ ed ];
20 };
a95ab089 21 apache = rec {
1635a4ae
IB
22 user = "wwwrun";
23 group = "wwwrun";
a95ab089
IB
24 webappName = "tools_infcloud";
25 root = "/run/current-system/webapps/${webappName}";
1635a4ae 26 vhostConf = ''
a95ab089
IB
27 Alias /carddavmate ${root}
28 Alias /caldavzap ${root}
29 Alias /infcloud ${root}
30 <Directory ${root}>
1635a4ae
IB
31 AllowOverride All
32 Options FollowSymlinks
33 Require all granted
34 DirectoryIndex index.html
35 </Directory>
36 '';
37 };
38 };
39in
40 infcloud