Add gh-notify service & timer

This commit is contained in:
ItsDrike 2024-08-08 13:35:09 +02:00
parent 290a009955
commit afe3615329
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 32 additions and 0 deletions

View file

@ -3,5 +3,6 @@ _: {
./dunst.nix ./dunst.nix
./hyprpaper.nix ./hyprpaper.nix
./hypridle.nix ./hypridle.nix
./gh-notify.nix
]; ];
} }

View file

@ -0,0 +1,31 @@
{
lib,
pkgs,
...
}: let
inherit (lib) getExe;
scriptPkgs = import ../packages/cli/scripts/packages {inherit pkgs;};
in {
systemd.user = {
services.gh-notify = {
Unit = {
Description = "Show unread GitHub notifications";
After = ["dunst.service"];
};
Install.WantedBy = ["graphical-session.target"];
Service = {
ExecStart = "${getExe scriptPkgs.gh-notify} -vv";
Type = "oneshot";
RemainAfterExit = false;
Restart = "on-failure";
RestartSec = "3s";
};
};
timers.gh-notify = {
Unit.Description = "Timer of GitHub notification sendout";
Timer.OnUnitActiveSec = "1m";
Install.WantedBy = ["graphical-session.target"];
};
};
}