- type = lib.types.attrsOf (lib.types.submodule {
- options = {
- dir = lib.mkOption {
- type = lib.types.str;
- description = "Where to put the certificate and key.";
- default = "/secrets";
+ description = "Certificates to generate.";
+ example = {
+ send-email.user = "stunnel";
+ send-print.user = "stunnel";
+ };
+ type = lib.types.attrsOf (
+ lib.types.submodule {
+ options = {
+ dir = lib.mkOption {
+ type = lib.types.str;
+ description = "Where to put the certificate and key.";
+ default = "/secrets";
+ };
+ lifetime = lib.mkOption {
+ type = lib.types.str;
+ description = "Lifetime of the generated certificate (in days).";
+ # This doesn't yet include any notion of certificate rotation,
+ # so just make really long-lived certificates for now.
+ default = "99999";
+ };
+ print = lib.mkOption {
+ type = lib.types.bool;
+ description = "If set, print the certificate (public key) during activation.";
+ default = false;
+ };
+ user = lib.mkOption {
+ type = lib.types.str;
+ description = "The username that owns (can read) the secret key.";
+ };