rsibreak: add module
This commit is contained in:
parent
f99d4ba7c4
commit
be4b100ae5
|
@ -1076,6 +1076,14 @@ in
|
|||
support to your VSCode.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2019-05-04T23:56:39+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.rsibreak'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ let
|
|||
(loadModule ./services/polybar.nix { })
|
||||
(loadModule ./services/random-background.nix { })
|
||||
(loadModule ./services/redshift.nix { })
|
||||
(loadModule ./services/rsibreak.nix { condition = hostPlatform.isLinux; })
|
||||
(loadModule ./services/screen-locker.nix { })
|
||||
(loadModule ./services/stalonetray.nix { })
|
||||
(loadModule ./services/status-notifier-watcher.nix { })
|
||||
|
|
36
modules/services/rsibreak.nix
Normal file
36
modules/services/rsibreak.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue