services/ntfy: init
This commit is contained in:
parent
0bf3fa4a50
commit
7db8aae188
|
@ -9,6 +9,7 @@
|
|||
suites.server
|
||||
++ (with profiles; [
|
||||
services.caddy
|
||||
services.ntfy
|
||||
services.postgresql
|
||||
])
|
||||
++ (mylib.path.scanPaths ./. "default.nix");
|
||||
|
|
|
@ -16,6 +16,7 @@ in
|
|||
|
||||
# local ports
|
||||
enthalpy-gost = 3000;
|
||||
ntfy = 4000;
|
||||
|
||||
# public ports
|
||||
enthalpy-ipsec = 13000;
|
||||
|
|
29
nixos/profiles/services/ntfy/default.nix
Normal file
29
nixos/profiles/services/ntfy/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.ntfy-sh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base-url = "https://ntfy.rebmit.moe";
|
||||
listen-http = "[::1]:${toString config.networking.ports.ntfy}";
|
||||
auth-default-access = "deny-all";
|
||||
behind-proxy = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.ntfy-sh.serviceConfig = mylib.misc.serviceHardened // {
|
||||
DynamicUser = lib.mkForce false;
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."ntfy.rebmit.moe" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy ${config.services.ntfy-sh.settings.listen-http}
|
||||
'';
|
||||
};
|
||||
|
||||
services.restic.backups.b2.paths = [ "/var/lib/ntfy-sh" ];
|
||||
}
|
Loading…
Reference in a new issue