X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix%2FNUR.git;a=blobdiff_plain;f=modules%2Fwebsites%2Fdefault.nix;h=043fc6ecf619c0a51e8d57133649188af8afe777;hp=ef79cb3cbf77b52f604746607e878f03890b604c;hb=55ebe7be7375fe58c5e8a6f8edc31f768ddf5e6f;hpb=589aeb9297f6f2a99b98c07cb9a834bb5e25b9f0 diff --git a/modules/websites/default.nix b/modules/websites/default.nix index ef79cb3c..043fc6ec 100644 --- a/modules/websites/default.nix +++ b/modules/websites/default.nix @@ -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