From 108891744eaa7410e305871212d5b81c1b67a095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 12 Jan 2019 12:41:23 +0100 Subject: Refactor websites. This commit refactors websites into module per "vhost". --- virtual/modules/websites/tools/dav/infcloud.nix | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 virtual/modules/websites/tools/dav/infcloud.nix (limited to 'virtual/modules/websites/tools/dav/infcloud.nix') diff --git a/virtual/modules/websites/tools/dav/infcloud.nix b/virtual/modules/websites/tools/dav/infcloud.nix new file mode 100644 index 0000000..876578b --- /dev/null +++ b/virtual/modules/websites/tools/dav/infcloud.nix @@ -0,0 +1,38 @@ +{ 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 = { + user = "wwwrun"; + group = "wwwrun"; + vhostConf = '' + Alias /carddavmate ${webRoot} + Alias /caldavzap ${webRoot} + Alias /infcloud ${webRoot} + + AllowOverride All + Options FollowSymlinks + Require all granted + DirectoryIndex index.html + + ''; + }; + }; +in + infcloud -- cgit v1.2.3