From 4553f0b9297fde93b144dd1a57363d2c823db7b8 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sun, 8 Jun 2025 22:51:31 +0200 Subject: [PATCH] Add ntfy module --- modules/system/services/ntfy.nix | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 modules/system/services/ntfy.nix diff --git a/modules/system/services/ntfy.nix b/modules/system/services/ntfy.nix new file mode 100644 index 0000000..7791bd4 --- /dev/null +++ b/modules/system/services/ntfy.nix @@ -0,0 +1,33 @@ +{ + config, + lib, + ... +}: +let + cfg = config.custom.services.ntfy; +in +{ + options.custom.services.ntfy = { + enable = lib.mkEnableOption ""; + domain = lib.mkOption { + type = lib.types.nonEmptyStr; + default = ""; + }; + port = lib.mkOption { + type = lib.types.port; + default = 2586; + }; + }; + + config = lib.mkIf cfg.enable { + services.ntfy-sh = { + enable = true; + settings = { + base-url = "https://${cfg.domain}"; + listen-http = ":${toString cfg.port}"; + behind-proxy = true; + web-root = "disable"; + }; + }; + }; +}