]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/richie/production.nix
Add config for CI
[perso/Immae/Config/Nix.git] / modules / private / websites / richie / production.nix
index a6957af13937cf9b6620a64bef4e49f603a7da73..a548cff21a4d8117adc5f954c01c34c4ca52f309 100644 (file)
@@ -17,7 +17,6 @@ let
       sed -i "s@localedef --list-archive@localedef --list-archive /run/current-system/sw/lib/locale/locale-archive@" $out/admin/parametres.php
       '';
   };
-  webappdir = config.services.websites.webappDirsPaths.richie_production;
   secretPath = config.secrets.fullPaths."websites/richie/production";
   apacheUser = config.services.httpd.Prod.user;
   apacheGroup = config.services.httpd.Prod.group;
@@ -25,11 +24,9 @@ in
 {
   options.myServices.websites.richie.production.enable = lib.mkEnableOption "enable Richie's website";
   config = lib.mkIf cfg.enable {
-    services.duplyBackup.profiles.richie_production.rootDir = vardir;
     services.webstats.sites = [ { name = "europe-richie.org"; } ];
 
-    secrets.keys = [{
-      dest = "websites/richie/production";
+    secrets.keys."websites/richie/production" = {
       user = apacheUser;
       group = apacheGroup;
       permissions = "0400";
@@ -47,8 +44,7 @@ in
         $smtp_mailer->Auth('${smtp_mailer.user}', '${smtp_mailer.password}');
         ?>
         '';
-    }];
-    services.websites.webappDirs.richie_production = richieSrc;
+    };
     system.activationScripts.richie_production = {
       deps = [ "httpd" ];
       text = ''
@@ -85,7 +81,7 @@ in
       addToCerts  = true;
       certMainHost = "europe-richie.org";
       hosts       = [ "europe-richie.org" "www.europe-richie.org" ];
-      root        = webappdir;
+      root        = richieSrc;
       extraConfig = [
         ''
         Use Stats europe-richie.org
@@ -93,7 +89,7 @@ in
         <LocationMatch "^/files/.*/admin/">
           Require all denied
         </LocationMatch>
-        <Directory ${webappdir}>
+        <Directory ${richieSrc}>
           DirectoryIndex index.php index.htm index.html
           Options Indexes FollowSymLinks MultiViews Includes
           AllowOverride None