nixos/ntfy-sh: Create data folder and auth database

This commit is contained in:
Julien Malka 2023-01-15 15:47:51 +01:00
parent 5291eac38a
commit d32f9548cb
No known key found for this signature in database
GPG key ID: 6FC74C847011FD83

View file

@ -59,6 +59,10 @@ in
systemPackages = [ cfg.package ];
};
services.ntfy-sh.settings = {
auth-file = mkDefault "/var/lib/ntfy-sh/user.db";
};
systemd.services.ntfy-sh = {
description = "Push notifications server";
@ -68,6 +72,7 @@ in
serviceConfig = {
ExecStart = "${cfg.package}/bin/ntfy serve -c ${configuration}";
User = cfg.user;
StateDirectory = "ntfy-sh";
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
PrivateTmp = true;