fork/home-manager
git clone https://git.julia.blue/fork/home-manager
9b917098
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . services . safeeyes ; 8 9in { 10meta . maintainers = [ hm . maintainers . rosuavio ]; 11 12options = { 13services . safeeyes = { 14enable = mkEnableOption "The Safe Eyes OSGI service" ; 15 16package = mkPackageOption pkgs "safeeyes" { }; 17}; 18}; 19 20config = mkIf cfg . enable { 21assertions = [ 22( hm . assertions . assertPlatform "services.safeeyes" pkgs platforms . linux ) 23]; 24 25home . packages = [ cfg . package ]; 26 27systemd . user . services . safeeyes = { 28Install . WantedBy = [ "graphical-session.target" ]; 29 30Unit = { 31Description = "Safe Eyes" ; 32PartOf = [ "graphical-session.target" ]; 33StartLimitIntervalSec = 350 ; 34StartLimitBurst = 30 ; 35}; 36 37Service = { 38ExecStart = getExe pkgs . safeeyes ; 39Restart = "on-failure" ; 40RestartSec = 3 ; 41}; 42}; 43}; 44}