fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . services . notify-osd ; 8 9in { 10meta . maintainers = [ maintainers . imalison ]; 11 12options = { 13services . notify-osd = { 14enable = mkEnableOption "notify-osd" ; 15 16package = mkOption { 17type = types . package ; 18default = pkgs . notify-osd ; 19defaultText = literalExpression "pkgs.notify-osd" ; 20description = '' 21Package containing the {command}`notify-osd` program. 22'' ; 23}; 24}; 25}; 26 27config = mkIf cfg . enable { 28assertions = [ 29( lib . hm . assertions . assertPlatform "services.notify-osd" pkgs 30lib . platforms . linux ) 31]; 32 33systemd . user . services . notify-osd = { 34Unit = { 35Description = "notify-osd" ; 36After = [ "graphical-session-pre.target" ]; 37PartOf = [ "graphical-session.target" ]; 38}; 39 40Install . WantedBy = [ "graphical-session.target" ]; 41 42Service = { 43ExecStart = " ${ cfg . package } /bin/notify-osd" ; 44Restart = "on-abort" ; 45}; 46}; 47}; 48}