aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites/tools/dav
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-16 15:31:07 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-16 16:11:15 +0100
commita95ab089420d6edf24f22500dabf7876d329dc91 (patch)
treeee769ebdc128d9ef34608462778d1b7f35ac5469 /nixops/modules/websites/tools/dav
parent7da3ceece7fe6c49046e97f37fc353db9b8a981c (diff)
downloadNix-a95ab089420d6edf24f22500dabf7876d329dc91.tar.gz
Nix-a95ab089420d6edf24f22500dabf7876d329dc91.tar.zst
Nix-a95ab089420d6edf24f22500dabf7876d329dc91.zip
Move tools websites to stable web directories
Diffstat (limited to 'nixops/modules/websites/tools/dav')
-rw-r--r--nixops/modules/websites/tools/dav/davical.nix10
-rw-r--r--nixops/modules/websites/tools/dav/default.nix5
-rw-r--r--nixops/modules/websites/tools/dav/infcloud.nix12
3 files changed, 18 insertions, 9 deletions
diff --git a/nixops/modules/websites/tools/dav/davical.nix b/nixops/modules/websites/tools/dav/davical.nix
index 3f43607..6668fa1 100644
--- a/nixops/modules/websites/tools/dav/davical.nix
+++ b/nixops/modules/websites/tools/dav/davical.nix
@@ -89,14 +89,16 @@ let
89 buildInputs = [ gettext ]; 89 buildInputs = [ gettext ];
90 }; 90 };
91 webRoot = "${webapp}/htdocs"; 91 webRoot = "${webapp}/htdocs";
92 apache = { 92 apache = rec {
93 user = "wwwrun"; 93 user = "wwwrun";
94 group = "wwwrun"; 94 group = "wwwrun";
95 modules = [ "proxy_fcgi" ]; 95 modules = [ "proxy_fcgi" ];
96 webappName = "tools_davical";
97 root = "/run/current-system/webapps/${webappName}";
96 vhostConf = '' 98 vhostConf = ''
97 Alias /davical "${webRoot}" 99 Alias /davical "${root}"
98 Alias /caldav.php "${webRoot}/caldav.php" 100 Alias /caldav.php "${root}/caldav.php"
99 <Directory "${webRoot}"> 101 <Directory "${root}">
100 DirectoryIndex index.php index.html 102 DirectoryIndex index.php index.html
101 AcceptPathInfo On 103 AcceptPathInfo On
102 AllowOverride None 104 AllowOverride None
diff --git a/nixops/modules/websites/tools/dav/default.nix b/nixops/modules/websites/tools/dav/default.nix
index ef9735e..5b5d21e 100644
--- a/nixops/modules/websites/tools/dav/default.nix
+++ b/nixops/modules/websites/tools/dav/default.nix
@@ -30,6 +30,11 @@ in {
30 davical = davical.phpFpm.pool; 30 davical = davical.phpFpm.pool;
31 }; 31 };
32 32
33 system.extraSystemBuilderCmds = ''
34 mkdir -p $out/webapps
35 ln -s ${davical.webRoot} $out/webapps/${davical.apache.webappName}
36 ln -s ${infcloud.webRoot} $out/webapps/${infcloud.apache.webappName}
37 '';
33 }; 38 };
34} 39}
35 40
diff --git a/nixops/modules/websites/tools/dav/infcloud.nix b/nixops/modules/websites/tools/dav/infcloud.nix
index 876578b..f1204ab 100644
--- a/nixops/modules/websites/tools/dav/infcloud.nix
+++ b/nixops/modules/websites/tools/dav/infcloud.nix
@@ -18,14 +18,16 @@ let
18 ''; 18 '';
19 buildInputs = [ ed ]; 19 buildInputs = [ ed ];
20 }; 20 };
21 apache = { 21 apache = rec {
22 user = "wwwrun"; 22 user = "wwwrun";
23 group = "wwwrun"; 23 group = "wwwrun";
24 webappName = "tools_infcloud";
25 root = "/run/current-system/webapps/${webappName}";
24 vhostConf = '' 26 vhostConf = ''
25 Alias /carddavmate ${webRoot} 27 Alias /carddavmate ${root}
26 Alias /caldavzap ${webRoot} 28 Alias /caldavzap ${root}
27 Alias /infcloud ${webRoot} 29 Alias /infcloud ${root}
28 <Directory ${webRoot}> 30 <Directory ${root}>
29 AllowOverride All 31 AllowOverride All
30 Options FollowSymlinks 32 Options FollowSymlinks
31 Require all granted 33 Require all granted