nixpkgs/nixos/modules/services/misc/safeeyes.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
756 B
Nix
Raw Normal View History

2018-04-04 20:15:16 +00:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.safeeyes;
in
{
###### interface
options = {
services.safeeyes = {
enable = mkEnableOption (lib.mdDoc "the safeeyes OSGi service");
2018-04-04 20:15:16 +00:00
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.safeeyes ];
2018-04-04 20:15:16 +00:00
systemd.user.services.safeeyes = {
description = "Safeeyes";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
startLimitIntervalSec = 350;
startLimitBurst = 10;
2018-04-04 20:15:16 +00:00
serviceConfig = {
ExecStart = ''
${pkgs.safeeyes}/bin/safeeyes
'';
2018-04-10 18:06:38 +00:00
Restart = "on-failure";
2018-04-04 20:15:16 +00:00
RestartSec = 3;
};
};
};
}