safeeyes: add module

wip/yesman
BjornMelgaard 6 years ago
parent 3bbe655c44
commit 2f4a220130
  1. 1
      nixos/modules/module-list.nix
  2. 48
      nixos/modules/services/misc/safeeyes.nix
  3. 4
      pkgs/applications/misc/safeeyes/default.nix

@ -366,6 +366,7 @@
./services/misc/ripple-data-api.nix
./services/misc/rogue.nix
./services/misc/serviio.nix
./services/misc/safeeyes.nix
./services/misc/siproxd.nix
./services/misc/snapper.nix
./services/misc/sonarr.nix

@ -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
postPatch = ''
sed -i \
-e 's!xprintidle!${xprintidle-ng}/bin/xprintidle-ng!g' \
-e 's!xprintidle!xprintidle-ng!g' \
safeeyes/plugins/smartpause/plugin.py
sed -i \
-e 's!xprintidle!${xprintidle-ng}/bin/xprintidle-ng!g' \
-e 's!xprintidle!xprintidle-ng!g' \
safeeyes/plugins/smartpause/config.json
'';

Loading…
Cancel
Save