]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/blobdiff - modules/websites/default.nix
Finish moving aten php configuration to dedicated module
[perso/Immae/Config/Nix/NUR.git] / modules / websites / default.nix
index ef79cb3cbf77b52f604746607e878f03890b604c..043fc6ecf619c0a51e8d57133649188af8afe777 100644 (file)
@@ -23,14 +23,6 @@ in
         Name of the webapp dir to create in /run/current-system
         '';
     };
-    webappDirsPath = mkOption {
-      type = str;
-      readOnly = true;
-      description = ''
-        Full path of the webapp dir
-        '';
-      default = "/run/current-system/${cfg.webappDirsName}";
-    };
     env = mkOption {
       default = {};
       description = "Each type of website to enable will target a distinct httpd server";
@@ -126,6 +118,17 @@ in
         };
       });
     };
+    # Readonly variables
+    webappDirsPaths = mkOption {
+      type = attrsOf path;
+      readOnly = true;
+      description = ''
+        Full paths of the webapp dir
+        '';
+      default = attrsets.mapAttrs' (name: icfg: attrsets.nameValuePair
+        name "/run/current-system/${cfg.webappDirsName}/${name}"
+      ) cfg.webappDirs;
+    };
   };
 
   config.services.httpd = let