Skip to content

Commit

Permalink
nixos/phoebus/alarm-server: add email options
Browse files Browse the repository at this point in the history
  • Loading branch information
minijackson committed Oct 27, 2023
1 parent a174301 commit a81a155
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions nixos/modules/phoebus/alarm-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
};
};
};
};
Expand Down

0 comments on commit a81a155

Please sign in to comment.