]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/default.nix
Rename backup module to duply_backup
[perso/Immae/Config/Nix.git] / modules / private / websites / default.nix
index 0d420ea0905cd7c225c89e404631ba9c91f67db1..87fdd73fdbf6ea725f6dd1a27aa9d943a2b57d72 100644 (file)
@@ -56,7 +56,7 @@ let
     };
     customLog = {
       extraConfig = ''
-        LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedVhost
+        LogFormat "%{Host}i:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedVhost
       '';
     };
   };
@@ -64,15 +64,22 @@ let
   makeExtraConfig = (builtins.filter (x: x != null) (lib.attrsets.mapAttrsToList (n: v: v.extraConfig or null) apacheConfig));
 in
 {
-  options.myServices.websites.webappDirs = lib.mkOption {
-    type = lib.types.attrsOf lib.types.path;
-    description = ''
-      Webapp paths to create in /run/current-system/webapps
-      '';
-    default = {};
+  options.myServices.websites = {
+    enable = lib.mkEnableOption "enable websites";
+
+    webappDirs = lib.mkOption {
+      type = lib.types.attrsOf lib.types.path;
+      description = ''
+        Webapp paths to create in /run/current-system/webapps
+        '';
+      default = {};
+    };
   };
 
-  config = {
+  config = lib.mkIf config.myServices.websites.enable {
+    services.duplyBackup.profiles.php = {
+      rootDir = "/var/lib/php";
+    };
     users.users.wwwrun.extraGroups = [ "keys" ];
     networking.firewall.allowedTCPPorts = [ 80 443 ];
 
@@ -248,6 +255,7 @@ in
       nassime.production.enable = true;
 
       naturaloutil.production.enable = true;
+      telioTortay.production.enable = true;
 
       papa.surveillance.enable = true;
 
@@ -264,6 +272,7 @@ in
       tools.mediagoblin.enable = true;
       tools.peertube.enable = true;
       tools.tools.enable = true;
+      tools.email.enable = true;
     };
   };
 }