mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
c1831f6c90
safeeyes: fix double wrap
50 lines
756 B
Nix
50 lines
756 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.safeeyes;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
services.safeeyes = {
|
|
|
|
enable = mkEnableOption (lib.mdDoc "the safeeyes OSGi service");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.safeeyes ];
|
|
|
|
systemd.user.services.safeeyes = {
|
|
description = "Safeeyes";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
partOf = [ "graphical-session.target" ];
|
|
|
|
startLimitIntervalSec = 350;
|
|
startLimitBurst = 10;
|
|
serviceConfig = {
|
|
ExecStart = ''
|
|
${pkgs.safeeyes}/bin/safeeyes
|
|
'';
|
|
Restart = "on-failure";
|
|
RestartSec = 3;
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|