diff --git a/nixos/modules/phoebus/alarm-server.nix b/nixos/modules/phoebus/alarm-server.nix index 7eb4c23d..9319af53 100644 --- a/nixos/modules/phoebus/alarm-server.nix +++ b/nixos/modules/phoebus/alarm-server.nix @@ -101,6 +101,56 @@ in { default = ["Accelerator"]; apply = lib.concatStringsSep ","; }; + + # Email options: + # --- + + "org.phoebus.email/mailhost" = lib.mkOption { + description = '' + The SMTP server host. + + If set to DISABLE (the default), email support is disabled. + ''; + type = lib.types.str; + default = "DISABLE"; + }; + + "org.phoebus.email/mailport" = lib.mkOption { + description = '' + The SMTP server port. + ''; + type = lib.types.port; + default = 25; + apply = toString; + }; + + "org.phoebus.email/username" = lib.mkOption { + description = '' + Username for authenticating to the SMTP server. + ''; + type = lib.types.str; + default = ""; + }; + + "org.phoebus.email/password" = lib.mkOption { + description = '' + Password for authenticating to the SMTP server. + + Note: the password will be put in plaintext, in the world-readable `/nix/store`. + ''; + type = lib.types.str; + default = ""; + }; + + "org.phoebus.email/from" = lib.mkOption { + description = '' + Default address to be used for the email field `From:`. + + If left empty, then the last used from address is used. + ''; + type = lib.types.str; + default = ""; + }; }; }; };