1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-13 22:59:44 +01:00
home-manager/modules/services/rsibreak.nix

39 lines
785 B
Nix
Raw Normal View History

2019-04-29 19:22:37 +02:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.rsibreak;
2020-02-02 00:39:17 +01:00
in {
2019-04-29 19:22:37 +02:00
options.services.rsibreak = {
enable = mkEnableOption "rsibreak";
};
config = mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.rsibreak" pkgs
lib.platforms.linux)
];
home.packages = [ pkgs.rsibreak ];
2019-04-29 19:22:37 +02:00
systemd.user.services.rsibreak = {
Unit = {
Description = "RSI break timer";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
2020-02-02 00:39:17 +01:00
Install = { WantedBy = [ "graphical-session.target" ]; };
2019-04-29 19:22:37 +02:00
Service = {
Environment = "PATH=${config.home.profileDirectory}/bin";
ExecStart = "${pkgs.rsibreak}/bin/rsibreak";
};
};
};
}