safeeyes: add module
This commit is contained in:
parent
3bbe655c44
commit
2f4a220130
|
@ -366,6 +366,7 @@
|
||||||
./services/misc/ripple-data-api.nix
|
./services/misc/ripple-data-api.nix
|
||||||
./services/misc/rogue.nix
|
./services/misc/rogue.nix
|
||||||
./services/misc/serviio.nix
|
./services/misc/serviio.nix
|
||||||
|
./services/misc/safeeyes.nix
|
||||||
./services/misc/siproxd.nix
|
./services/misc/siproxd.nix
|
||||||
./services/misc/snapper.nix
|
./services/misc/snapper.nix
|
||||||
./services/misc/sonarr.nix
|
./services/misc/sonarr.nix
|
||||||
|
|
48
nixos/modules/services/misc/safeeyes.nix
Normal file
48
nixos/modules/services/misc/safeeyes.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.safeeyes;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.safeeyes = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable the safeeyes OSGi service";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
systemd.user.services.safeeyes = {
|
||||||
|
description = "Safeeyes";
|
||||||
|
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.safeeyes}/bin/safeeyes
|
||||||
|
'';
|
||||||
|
RestartSec = 3;
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -30,11 +30,11 @@ in buildPythonApplication rec {
|
||||||
# patch smartpause plugin
|
# patch smartpause plugin
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's!xprintidle!${xprintidle-ng}/bin/xprintidle-ng!g' \
|
-e 's!xprintidle!xprintidle-ng!g' \
|
||||||
safeeyes/plugins/smartpause/plugin.py
|
safeeyes/plugins/smartpause/plugin.py
|
||||||
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's!xprintidle!${xprintidle-ng}/bin/xprintidle-ng!g' \
|
-e 's!xprintidle!xprintidle-ng!g' \
|
||||||
safeeyes/plugins/smartpause/config.json
|
safeeyes/plugins/smartpause/config.json
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue