]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/environment.nix
Rework integration websites
[perso/Immae/Config/Nix.git] / modules / private / environment.nix
index a8799d26e492ef821edd7aae8d194b1bcf94b82f..e469138a9fa51928560520ebd1f5e74b745d0b41 100644 (file)
@@ -228,6 +228,7 @@ in
       '';
       type = submodule {
         options = {
+          rootKeys = mkOption { type = attrsOf str; description = "Keys of root users"; };
           ldap = mkOption {
             description = ''
               LDAP credentials for cn=ssh,ou=services,dc=immae,dc=eu dn
@@ -384,6 +385,16 @@ in
             };
             type = attrsOf (attrsOf (listOf str));
           };
+          keys = mkOption {
+            default = {};
+            description = "DNS keys";
+            type = attrsOf (submodule {
+              options = {
+                algorithm = mkOption { type = str; description = "Algorithm"; };
+                secret    = mkOption { type = str; description = "Secret"; };
+              };
+            });
+          };
           slaveZones = mkOption {
             description = "List of slave zones";
             type = listOf (submodule {
@@ -393,6 +404,11 @@ in
                   description = "NS master groups of this zone";
                   type = listOf str;
                 };
+                keys = mkOption {
+                  default = [];
+                  description = "Keys associated to the server";
+                  type = listOf str;
+                };
               };
             });
           };
@@ -401,6 +417,7 @@ in
             type = listOf (submodule {
               options = {
                 name = mkOption { type = str; description = "zone name"; };
+                withCAA = mkOption { type = nullOr str; description = "CAA entry"; default = null; };
                 slaves = mkOption {
                   description = "NS slave groups of this zone";
                   type = listOf str;
@@ -558,6 +575,15 @@ in
               };
             };
           };
+          eban = mkOption {
+            description = "Eban credentials for webhook";
+            type = submodule {
+              options = {
+                user = mkOption { type = str; description = "User"; };
+                password = mkOption { type = str; description = "Password"; };
+              };
+            };
+          };
           nrdp_tokens = mkOption { type = listOf str; description = "Tokens allowed to push status update"; };
           slack_url = mkOption { type = str; description = "Slack webhook url to push status update"; };
           slack_channel = mkOption { type = str; description = "Slack channel to push status update"; };
@@ -595,7 +621,10 @@ in
       description = "FTP configuration";
       type = submodule {
         options = {
-          ldap = mkLdapOptions "FTP" {};
+          ldap = mkLdapOptions "FTP" {
+            proftpd_filter = mkOption { type = str; description = "Filter for proftpd listing in LDAP"; };
+            pure-ftpd_filter = mkOption { type = str; description = "Filter for pure-ftpd listing in LDAP"; };
+          };
         };
       };
     };
@@ -779,6 +808,16 @@ in
       description = "Buildbot configuration";
       type = submodule {
         options = {
+          ssh_key = mkOption {
+            description = "SSH key information";
+            type = submodule {
+              options = {
+                public = mkOption { type = str; description = "Public part of the key"; };
+                private = mkOption { type = lines; description = "Private part of the key"; };
+              };
+            };
+          };
+          workerPassword = mkOption { description = "Buildbot worker password"; type = str; };
           user = mkOption {
             description = "Buildbot user";
             type = submodule {
@@ -830,14 +869,17 @@ in
                     '';
                 };
                 pythonPathHome = mkOption { type = bool; description = "Whether to add project’s python home to python path"; };
+                workerPort = mkOption { type = port; description = "Port for the worker"; };
                 secrets = mkOption {
-                  type = attrsOf str;
-                  description = "Secrets for the project to dump as files";
+                  #type = attrsOf (either str (functionTo str));
+                  type = attrsOf unspecified;
+                  description = "Secrets for the project to dump as files. Might be a function that takes pkgs as argument";
                 };
                 environment = mkOption {
-                  type = attrsOf str;
+                  #type = attrsOf (either str (functionTo str));
+                  type = attrsOf unspecified;
                   description = ''
-                    Environment variables for the project.
+                    Environment variables for the project. Might be a function that takes pkgs as argument.
                     BUILDBOT_ is prefixed to the variable names
                   '';
                 };
@@ -933,6 +975,15 @@ in
             type = submodule {
               options = {
                 ldap = mkLdapOptions "Gitolite" {};
+                ssh_key = mkOption {
+                  description = "SSH key information";
+                  type = submodule {
+                    options = {
+                      public = mkOption { type = str; description = "Public part of the key"; };
+                      private = mkOption { type = lines; description = "Private part of the key"; };
+                    };
+                  };
+                };
               };
             };
           };
@@ -1140,6 +1191,16 @@ in
               };
             };
           };
+          cryptpad = mkOption {
+            description = "Cryptpad configuration";
+            type = attrsOf (submodule {
+              options = {
+                email = mkOption { type = str; description = "Admin e-mail"; };
+                admins = mkOption { type = listOf str; description = "Instance admin public keys"; };
+                port = mkOption { type = port; description = "Port to listen to"; };
+              };
+            });
+          };
           ympd = mkOption {
             description = "Ympd configuration";
             type = submodule {
@@ -1158,6 +1219,16 @@ in
               };
             };
           };
+          umami = mkOption {
+            description = "Umami configuration";
+            type = submodule {
+              options = {
+                listenPort = mkOption { type = port; description = "Port to listen to"; };
+                postgresql = mkPsqlOptions "Umami";
+                hashSalt = mkOption { type = str; description = "Hash salt"; };
+              };
+            };
+          };
           yourls = mkOption {
             description = "Yourls configuration";
             type = submodule {
@@ -1171,10 +1242,28 @@ in
         };
       };
     };
+    serverSpecific = mkOption { type = attrsOf unspecified; description = "Server specific configuration"; };
     websites = mkOption {
       description = "Websites configurations";
       type = submodule {
         options = {
+          christophe_carpentier = mkOption {
+            description = "Christophe Carpentier configuration by environment";
+            type = submodule {
+              options = {
+                agorakit = mkOption {
+                  description = "Agorakit configuration";
+                  type = submodule {
+                    options = {
+                      mysql = mkMysqlOptions "Agorakit" {};
+                      smtp = mkSmtpOptions "Agorakit";
+                      appkey = mkOption { type = str; description = "App key"; };
+                    };
+                  };
+                };
+              };
+            };
+          };
           immae = mkOption {
             description = "Immae configuration by environment";
             type = submodule {
@@ -1243,6 +1332,16 @@ in
                   options = {
                     production = chloeSubmodule;
                     integration = chloeSubmodule;
+                    new = mkOption {
+                      description = "environment configuration";
+                      type = submodule {
+                        options = {
+                          mysql = mkMysqlOptions "ChloeNew" {};
+                          ldap = mkLdapOptions "ChloeNew" {};
+                          secret = mkOption { type = str; description = "Symfony App secret"; };
+                        };
+                      };
+                    };
                   };
                 };
           };
@@ -1309,6 +1408,35 @@ in
                   };
                 };
           };
+          nicecoop = mkOption {
+            description = "Nicecoop configuration";
+            type = submodule {
+              options = {
+                odoo = {
+                  port = mkOption { description = "Port to listen to"; type = port; };
+                  longpoll_port = mkOption { description = "Port to listen to"; type = port; };
+                  postgresql = mkPsqlOptions "Odoo";
+                  admin_password = mkOption { type = str; description = "Admin password"; };
+                };
+                gestion-compte = {
+                  smtp = mkSmtpOptions "GestionCompte";
+                  mysql = mkMysqlOptions "gestion-compte" {};
+                  secret = mkOption { type = str; description = "Application secret"; };
+                  adminpassword = mkOption { type = str; description = "Admin password"; };
+                };
+                gestion-compte-integration = {
+                  smtp = mkSmtpOptions "GestionCompte";
+                  mysql = mkMysqlOptions "gestion-compte" {};
+                  secret = mkOption { type = str; description = "Application secret"; };
+                  adminpassword = mkOption { type = str; description = "Admin password"; };
+                };
+                copanier = {
+                  smtp = mkSmtpOptions "Copanier";
+                  staff = mkOption { type = listOf str; description = "List of staff members"; };
+                };
+              };
+            };
+          };
           emilia = mkOption {
             description = "Emilia configuration";
             type = submodule {
@@ -1412,13 +1540,6 @@ in
         };
       };
     };
-
-    privateFiles = mkOption {
-      type = path;
-      description = ''
-        Path to secret files to make available during build
-        '';
-    };
   };
   options.hostEnv = mkOption {
     readOnly = true;