From 5703c16118bae68772cf1529c2a8441748d823af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 28 Dec 2022 00:06:42 +0100 Subject: [PATCH] nixos/uptime-kuma: add option to enable apprise support --- nixos/modules/services/monitoring/uptime-kuma.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/monitoring/uptime-kuma.nix b/nixos/modules/services/monitoring/uptime-kuma.nix index b6dc993e6a05..fa6dc922f097 100644 --- a/nixos/modules/services/monitoring/uptime-kuma.nix +++ b/nixos/modules/services/monitoring/uptime-kuma.nix @@ -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";