mirror of
https://github.com/nix-community/home-manager
synced 2024-11-05 10:49:44 +01:00
32 lines
625 B
Nix
32 lines
625 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.rsibreak;
|
|
|
|
in {
|
|
options.services.rsibreak = {
|
|
|
|
enable = mkEnableOption "rsibreak";
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
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";
|
|
};
|
|
};
|
|
};
|
|
}
|