mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
Merge pull request #208038 from SuperSandro2000/uptime-kuma-apprise
nixos/uptime-kuma: add option to enable apprise support
This commit is contained in:
commit
f8dd03989e
@ -18,9 +18,10 @@ in
|
|||||||
description = lib.mdDoc "Uptime Kuma package to use.";
|
description = lib.mdDoc "Uptime Kuma package to use.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
appriseSupport = mkEnableOption (mdDoc "apprise support for notifications.");
|
||||||
|
|
||||||
settings = lib.mkOption {
|
settings = lib.mkOption {
|
||||||
type =
|
type = lib.types.submodule { freeformType = with lib.types; attrsOf str; };
|
||||||
lib.types.submodule { freeformType = with lib.types; attrsOf str; };
|
|
||||||
default = { };
|
default = { };
|
||||||
example = {
|
example = {
|
||||||
PORT = "4000";
|
PORT = "4000";
|
||||||
@ -47,6 +48,7 @@ in
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment = cfg.settings;
|
environment = cfg.settings;
|
||||||
|
path = lib.mkIf cfg.appriseSupport (with pkgs; [ apprise ]);
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
StateDirectory = "uptime-kuma";
|
StateDirectory = "uptime-kuma";
|
||||||
|
Loading…
Reference in New Issue
Block a user