]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/environment.nix
Add status engine website
[perso/Immae/Config/Nix.git] / modules / private / environment.nix
index ec9bf29f3c5d2736a2822482f2eed75b5cabd52a..3a805c601b7693cf87f3f68ab95e5dfc96bd1180 100644 (file)
@@ -108,6 +108,19 @@ let
       };
     };
   };
+  smtpOptions = {
+    host = mkOption { description = "Host to access SMTP"; type = str; };
+    port = mkOption { description = "Port to access SMTP"; type = str; };
+  };
+  mkSmtpOptions = name: mkOption {
+    description = "${name} smtp configuration";
+    type = submodule {
+      options = smtpOptions // {
+        email = mkOption { description = "${name} email"; type = str; };
+        password = mkOption { description = "SMTP password of the ${name} user"; type = str; };
+      };
+    };
+  };
   hostEnv = submodule {
     options = {
       fqdn = mkOption {
@@ -258,6 +271,10 @@ in
         };
       };
     };
+    smtp = mkOption {
+      type = submodule { options = smtpOptions; };
+      description = "SMTP configuration";
+    };
     ldap = mkOption {
       description = ''
         LDAP server configuration
@@ -1003,6 +1020,15 @@ in
               };
             };
           };
+          status_engine = mkOption {
+            description = "Status Engine configuration";
+            type = submodule {
+              options = {
+                mysql = mkMysqlOptions "StatusEngine" {};
+                ldap = mkLdapOptions "StatusEngine" {};
+              };
+            };
+          };
           task = mkOption {
             description = "Taskwarrior configuration";
             type = submodule {
@@ -1051,6 +1077,16 @@ in
             type = attrsOf str;
             description = "Mapping 'name'.php => script for webhooks";
           };
+          commento = mkOption {
+            description = "Commento configuration";
+            type = submodule {
+              options = {
+                listenPort = mkOption { type = port; description = "Port to listen to"; };
+                postgresql = mkPsqlOptions "Commento";
+                smtp = mkSmtpOptions "Commento";
+              };
+            };
+          };
           ympd = mkOption {
             description = "Ympd configuration";
             type = submodule {