]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/environment.nix
Add dilion server
[perso/Immae/Config/Nix.git] / modules / private / environment.nix
index 7da248004a3e47c0540da7e31f9cd98eff2a7892..3b51f37a7458f49513c7cf32259ef688f6364fa1 100644 (file)
@@ -114,6 +114,14 @@ let
         description = "Host FQDN";
         type = str;
       };
+      users = mkOption {
+        type = unspecified;
+        default = pkgs: [];
+        description = ''
+          Sublist of users from realUsers. Function that takes pkgs as
+          argument and gives an array as a result
+        '';
+      };
       emails = mkOption {
         default = [];
         description = "List of e-mails that the server can be a sender of";
@@ -287,6 +295,14 @@ in
         };
       };
     };
+    realUsers = mkOption {
+      description = ''
+        Attrset of function taking pkgs as argument.
+        Real users settings, should provide a subattr of users.users.<name>
+        with at least: name, (hashed)Password, shell
+      '';
+      type = attrsOf unspecified;
+    };
     users = mkOption {
       description = "System and regular users uid/gid";
       type = attrsOf (submodule {
@@ -420,7 +436,6 @@ in
         '';
       type = submodule {
         options = {
-          mailto = mkOption { type = str; description = "Where to e-mail on error"; };
           ssh_key = mkOption {
             description = "SSH key information";
             type = submodule {
@@ -494,8 +509,8 @@ in
                 port = mkOption { type = nullOr str; default = null; description = "Port to connect to ssh"; };
                 login = mkOption { type = nullOr str; default = null; description = "Login to connect to ssh"; };
                 targets = mkOption { type = listOf str; description = "Hosts to send E-mails to"; };
-                mail_address = mkOption { type = str; description = "E-mail recipient part to send e-mail to"; };
-                mail_domain = mkOption { type = str; description = "E-mail domain part to send e-mail to"; };
+                mail_address = mkOption { type = nullOr str; default = null; description = "E-mail recipient part to send e-mail to"; };
+                mail_domain = mkOption { type = nullOr str; default = null; description = "E-mail domain part to send e-mail to"; };
               };
             });
           };