mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 17:24:35 +00:00
Add gh-notify service & timer
This commit is contained in:
parent
290a009955
commit
afe3615329
|
@ -3,5 +3,6 @@ _: {
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
./hyprpaper.nix
|
./hyprpaper.nix
|
||||||
./hypridle.nix
|
./hypridle.nix
|
||||||
|
./gh-notify.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
31
home/services/gh-notify.nix
Normal file
31
home/services/gh-notify.nix
Normal 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"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue