{ 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"; } ]; }; }