Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions nixos/modules/services/security/authelia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,30 @@ let
'';
};

notifierSmtpPasswordFile = mkOption {
type = types.nullOr types.path;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types.path is usually not what you want: this accepts path literals and when somebody uses them wrongly (i.e. "${toString pathLiteral}" vs "${pathLiteral}") you end up silently copying things into your store.

pathWith is what you'll probably want.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know! The existing options use types.path as well -- do you think it's appropriate for this PR to address those options, too?

default = null;
description = ''
Path to your SMTP password file used to authenticate with the SMTP server.
'';
};

notifierSmtpTlsCertificateChainFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
Path to your certificate chain file used for TLS connection verification with the SMTP server.
'';
};

notifierSmtpTlsPrivateKeyFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
Path to your private key file used for TLS connection verification with the SMTP server.
'';
};

oidcIssuerPrivateKeyFile = mkOption {
type = types.nullOr types.path;
default = null;
Expand Down Expand Up @@ -372,6 +396,10 @@ in
AUTHELIA_STORAGE_ENCRYPTION_KEY_FILE = instance.secrets.storageEncryptionKeyFile;
AUTHELIA_SESSION_SECRET_FILE = instance.secrets.sessionSecretFile;
AUTHELIA_IDENTITY_PROVIDERS_OIDC_HMAC_SECRET_FILE = instance.secrets.oidcHmacSecretFile;
AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE = instance.secrets.notifierSmtpPasswordFile;
AUTHELIA_NOTIFIER_SMTP_TLS_CERTIFICATE_CHAIN_FILE =
instance.secrets.notifierSmtpTlsCertificateChainFile;
AUTHELIA_NOTIFIER_SMTP_TLS_PRIVATE_KEY_FILE = instance.secrets.notifierSmtpTlsPrivateKeyFile;
})
// instance.environmentVariables;

Expand Down