diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-30 17:15:55 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-30 17:15:55 +0200 |
| commit | cc9ab595bab3a76fe67d9e8ec88448b1e407a721 (patch) | |
| tree | bd6d11d0bee5c749964e6bfc91652c61faa72c64 /home/ntfy.nix | |
| parent | fd6e6d96a8f9048676af65fa027f41de9fee9b95 (diff) | |
| download | nixos-cc9ab595bab3a76fe67d9e8ec88448b1e407a721.tar.zst | |
Split configurations into separate modules
Diffstat (limited to '')
| -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"; + } + ]; + }; +} |
