diff options
Diffstat (limited to 'home/ntfy.nix')
| -rw-r--r-- | home/ntfy.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/home/ntfy.nix b/home/ntfy.nix new file mode 100644 index 0000000..06f0d38 --- /dev/null +++ b/home/ntfy.nix @@ -0,0 +1,40 @@ +{ config, pkgs, ... }: +{ + + systemd.user.services.ntfy-client = { + Unit = { + Description = "ntfy client subscriber"; + After = [ "graphical.target" ]; + }; + + Install = { + WantedBy = [ "default.target" ]; + }; + + Service = { + ExecStart = "${pkgs.ntfy-sh}/bin/ntfy subscribe --config /home/petri/.config/ntfy/client.yml --from-config"; + Restart = "on-failure"; + RestartSec = "10s"; + ProtectSystem = "strict"; + ProtectHome = "read-only"; + PrivateTmp = true; + NoNewPrivileges = true; + RestrictRealtime = true; + LockPersonality = true; + }; + }; + + xdg.configFile."ntfy/client.yml".source = (pkgs.formats.yaml { }).generate "ntfy-client-config" { + "default-host" = "https://ntfy.tammi.cc"; + subscribe = [ + { + topic = "77WxlkfsTzGrbYFw"; + host = "https://ntfy.tammi.cc"; + since = "1h"; + persist = true; + keepalive = "45s"; + format = "markdown"; + } + ]; + }; +} |
