nixos/uptime-kuma: add option to enable apprise support

This commit is contained in:
Sandro Jäckel 2022-12-28 00:06:42 +01:00 committed by Sandro Jäckel
parent 7c782c9bc1
commit 5703c16118
No known key found for this signature in database
GPG key ID: B1763F8651144063

View file

@ -18,9 +18,10 @@ in
description = lib.mdDoc "Uptime Kuma package to use.";
};
appriseSupport = mkEnableOption (mdDoc "apprise support for notifications.");
settings = lib.mkOption {
type =
lib.types.submodule { freeformType = with lib.types; attrsOf str; };
type = lib.types.submodule { freeformType = with lib.types; attrsOf str; };
default = { };
example = {
PORT = "4000";
@ -47,6 +48,7 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = cfg.settings;
path = lib.mkIf cfg.appriseSupport (with pkgs; [ apprise ]);
serviceConfig = {
Type = "simple";
StateDirectory = "uptime-kuma";