Make [notifications.pushover] optional for non-pushover methods

The pushover config section is now only required when notifications.method
is "pushover". Validation at startup rejects the missing-section case so a
misconfiguration fails fast instead of erroring on every notification.

Updates the sample TOML, README and nix module for consistency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-04 17:45:02 -04:00
co-authored by Claude Opus 4.8
parent 6c4f8c22bb
commit be2a8fce58
6 changed files with 123 additions and 29 deletions
+17 -9
View File
@@ -111,15 +111,23 @@ in {
description = "Send a notification if a device comes back online after not being seen for this timeframe.";
default = "1w";
};
notifications.pushover.token = mkOption {
type = types.str;
description = "Your pushover token goes here, just copy&paste from their website after creating the app.";
default = "";
};
notifications.pushover.user_key = mkOption {
type = types.str;
description = "User key goes here, this is the account wide code for pushover.";
default = "";
notifications.pushover = mkOption {
type = types.nullOr (types.submodule {
options = {
token = mkOption {
type = types.str;
description = "Your pushover token goes here, just copy&paste from their website after creating the app.";
default = "";
};
user_key = mkOption {
type = types.str;
description = "User key goes here, this is the account wide code for pushover.";
default = "";
};
};
});
description = "Pushover credentials. Only required when notifications.method is \"pushover\"; leave it null (the default) for any other method.";
default = null;
};
retention.window = mkOption {
type = types.str;