2020-10-12 00:22:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.rsibreak;
|
|
|
|
|
|
|
|
in {
|
|
|
|
options.services.rsibreak = {
|
|
|
|
|
|
|
|
enable = mkEnableOption "rsibreak";
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-07-02 22:36:30 +00:00
|
|
|
home.packages = [ pkgs.rsibreak ];
|
2020-10-12 00:22:58 +00:00
|
|
|
systemd.user.services.rsibreak = {
|
|
|
|
Unit = {
|
|
|
|
Description = "RSI break timer";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
|
|
|
ExecStart = "${pkgs.rsibreak}/bin/rsibreak";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|