ocamlPackages.hxd: 0.3.2 -> 0.3.3 (#364231)
[NixPkgs.git] / nixos / modules / services / misc / safeeyes.nix
blobc3c8d7b8a3ff6854068e72b706b1299f50c8404e
2   config,
3   lib,
4   pkgs,
5   ...
6 }:
7 let
9   cfg = config.services.safeeyes;
15   ###### interface
17   options = {
19     services.safeeyes = {
21       enable = lib.mkEnableOption "the safeeyes OSGi service";
23     };
25   };
27   ###### implementation
29   config = lib.mkIf cfg.enable {
31     environment.systemPackages = [ pkgs.safeeyes ];
33     systemd.user.services.safeeyes = {
34       description = "Safeeyes";
36       wantedBy = [ "graphical-session.target" ];
37       partOf = [ "graphical-session.target" ];
39       startLimitIntervalSec = 350;
40       startLimitBurst = 10;
41       serviceConfig = {
42         ExecStart = ''
43           ${pkgs.safeeyes}/bin/safeeyes
44         '';
45         Restart = "on-failure";
46         RestartSec = 3;
47       };
48     };
50   };