1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-30 18:38:31 +02:00
home-manager/modules/services/rsibreak.nix
Christopher League 6d9bff77ed
rsibreak: add package when enabled; fixes #2092 (#2118)
Otherwise rsibreak cannot find its icon and is a blank gap on the
notification tray.
2021-06-17 09:08:10 -06:00

34 lines
664 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.rsibreak;
in {
options.services.rsibreak = {
enable = mkEnableOption "rsibreak";
};
config = mkIf cfg.enable {
home.packages = [ pkgs.rsibreak ];
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";
};
};
};
}