mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
Add ntfy module
This commit is contained in:
parent
df3f7ed8f6
commit
4553f0b929
1 changed files with 33 additions and 0 deletions
33
modules/system/services/ntfy.nix
Normal file
33
modules/system/services/ntfy.nix
Normal file
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue