]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/default.nix
Use attrs for secrets instead of lists
[perso/Immae/Config/Nix.git] / modules / private / websites / default.nix
index 94506c9261065e1c18e15b27abadb7a2435f2b35..e8193242b08e2c3980de7d0c026361051656b62a 100644 (file)
@@ -52,7 +52,7 @@ let
           LDAPOpCacheTTL 600
         </IfModule>
 
-        Include /var/secrets/apache-ldap
+        Include ${config.secrets.fullPaths."apache-ldap"}
       '';
     };
     global = {
@@ -104,12 +104,12 @@ in
   config = lib.mkIf config.myServices.websites.enable {
     services.duplyBackup.profiles.php = {
       rootDir = "/var/lib/php";
+      remotes = [ "eriomem" "ovh" ];
     };
     users.users.wwwrun.extraGroups = [ "keys" ];
     networking.firewall.allowedTCPPorts = [ 80 443 ];
 
-    secrets.keys = [{
-      dest = "apache-ldap";
+    secrets.keys."apache-ldap" = {
       user = "wwwrun";
       group = "wwwrun";
       permissions = "0400";
@@ -125,7 +125,7 @@ in
           </IfModule>
         </Macro>
         '';
-    }];
+    };
 
     system.activationScripts = {
       httpd = ''
@@ -148,9 +148,9 @@ in
       };
     };
 
-    services.filesWatcher.httpdProd.paths = [ "/var/secrets/apache-ldap" ];
-    services.filesWatcher.httpdInte.paths = [ "/var/secrets/apache-ldap" ];
-    services.filesWatcher.httpdTools.paths = [ "/var/secrets/apache-ldap" ];
+    services.filesWatcher.httpdProd.paths = [ config.secrets.fullPaths."apache-ldap" ];
+    services.filesWatcher.httpdInte.paths = [ config.secrets.fullPaths."apache-ldap" ];
+    services.filesWatcher.httpdTools.paths = [ config.secrets.fullPaths."apache-ldap" ];
 
     services.websites.env.production = {
       enable = true;
@@ -221,6 +221,7 @@ in
       _theme = pkgs.webapps.apache-theme.theme;
     };
     myServices.websites = {
+      bakeer.cloud.enable = true;
       capitaines.landing_pages.enable = true;
 
       chloe = {
@@ -241,10 +242,15 @@ in
         evariste.enable = true;
         denisejerome.enable = true;
         oms.enable = true;
+        bingo.enable = true;
+        aventuriers.enable = true;
         production.enable = true;
       };
 
-      emilia.moodle.enable = true;
+      emilia = {
+        moodle.enable = false;
+        atelierfringant.enable = true;
+      };
 
       florian = {
         app.enable = true;
@@ -275,18 +281,24 @@ in
 
       nassime.production.enable = true;
 
-      nathanael.villon.enable = true;
+      nath.villon.enable = true;
 
       papa = {
         surveillance.enable = true;
         maison_bbc.enable = true;
       };
 
+      patrick_fodella.production.enable = true;
+
       piedsjaloux = {
         integration.enable = true;
         production.enable = true;
       };
 
+      ressourcerie_banon.production.enable = true;
+      ressourcerie_banon.cryptpad.enable = true;
+      ressourcerie_banon.cloud.enable = true;
+
       richie.production.enable = true;
 
       syden.peertube.enable = true;
@@ -296,6 +308,7 @@ in
       tools.assets.enable = true;
       tools.cloud.enable = true;
       tools.commento.enable = true;
+      tools.cryptpad.enable = true;
       tools.dav.enable = true;
       tools.db.enable = true;
       tools.diaspora.enable = true;
@@ -307,8 +320,10 @@ in
       tools.performance.enable = true;
       tools.tools.enable = true;
       tools.email.enable = true;
+      tools.stats.enable = false;
 
       games.codenames.enable = true;
+      games.terraforming-mars.enable = true;
     };
   };
 }