Add natstonotify service
All checks were successful
Run nix flake check / flake-check (push) Successful in 1m46s
Periodic flake update / flake-update (push) Successful in 1m17s

This commit is contained in:
2025-02-11 20:48:34 +01:00
parent fc1a32e1c5
commit 1e3c0f5a00
3 changed files with 16 additions and 9 deletions

View File

@@ -1,12 +1,18 @@
{ pkgs, ... }:
{ pkgs, config, ... }:
{
sops.secrets."nats_nkey" = { };
systemd.user.services.natstonotify = {
Unit = {
Description = "Run natstonotify";
After = [ "sops-nix.service" ];
};
Service = {
Environment = [
"NATS_URL=nats://nats1.home.2rjus.net:4222"
"NATS_NKEY_FILE=${config.sops.secrets.nats_nkey.path}"
];
Type = "simple";
ExecStart = "${pkgs.natstonotify}/bin/natstonotify";
ExecStart = "${pkgs.natstonotify}/bin/natstonotify server";
};
Install = {
WantedBy = [ "graphical-session.target" ];