]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/tools/tools/rompr.nix
Remove useless relative symlinks
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / tools / rompr.nix
index 98c48a7fe487159aea122feca149cbe3f43a78e4..ca93bead97777411d86b60df0d2e6c0260cee6f4 100644 (file)
@@ -10,18 +10,20 @@ let
     webRoot = stdenv.mkDerivation (fetchedGithub ./rompr.json // rec {
       installPhase = ''
         cp -a . $out
-        ln -sf ../../../../../../${varDir}/prefs $out/prefs
-        ln -sf ../../../../../../${varDir}/albumart $out/albumart
+        ln -sf ${varDir}/prefs $out/prefs
+        ln -sf ${varDir}/albumart $out/albumart
       '';
     });
-    apache = {
+    apache = rec {
       user = "wwwrun";
       group = "wwwrun";
       modules = [ "headers" "mime" "proxy_fcgi" ];
+      webappName = "tools_rompr";
+      root = "/run/current-system/webapps/${webappName}";
       vhostConf = ''
-        Alias /rompr ${webRoot}
+        Alias /rompr ${root}
 
-        <Directory ${webRoot}>
+        <Directory ${root}>
           Options Indexes FollowSymLinks
           DirectoryIndex index.php
           AllowOverride all
@@ -36,12 +38,12 @@ let
           </FilesMatch>
         </Directory>
 
-        <Directory ${webRoot}/albumart/small>
+        <Directory ${root}/albumart/small>
             Header Set Cache-Control "max-age=0, no-store"
             Header Set Cache-Control "no-cache, must-revalidate"
         </Directory>
 
-        <Directory ${webRoot}/albumart/asdownloaded>
+        <Directory ${root}/albumart/asdownloaded>
             Header Set Cache-Control "max-age=0, no-store"
             Header Set Cache-Control "no-cache, must-revalidate"
         </Directory>