about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2023-01-15 17:49:34 +0100
committerGitHub <noreply@github.com>2023-01-15 17:49:34 +0100
commit07dabf11e1371b51ab9e2ae4a297aae5c6698282 (patch)
tree5a7261c07066ba4146d3b5701fae3e4678ec858b /nixos
parent65e07f20cf04f5db9921dcfa202591997e0f7cd2 (diff)
parentd32f9548cbcc7ac66f4e5d31fa6d9313e129e20e (diff)
Merge pull request #210935 from JulienMalka/Ntfy-data-folder
nixos/ntfy-sh: Create data folder and auth database
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/ntfy-sh.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/ntfy-sh.nix b/nixos/modules/services/misc/ntfy-sh.nix
index 9d52fcf25364f..d66b47a2d68ad 100644
--- a/nixos/modules/services/misc/ntfy-sh.nix
+++ b/nixos/modules/services/misc/ntfy-sh.nix
@@ -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;