fork/home-manager
git clone https://git.julia.blue/fork/home-manager
5f433eb1
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . xsession . numlock ; 8 9in { 10meta . maintainers = [ maintainers . evanjs ]; 11 12options = { xsession . numlock . enable = mkEnableOption "Num Lock" ; }; 13 14config = mkIf cfg . enable { 15assertions = [ 16( hm . assertions . assertPlatform "xsession.numlock" pkgs platforms . linux ) 17]; 18 19systemd . user . services . numlockx = { 20Unit = { 21Description = "NumLockX" ; 22After = [ "graphical-session-pre.target" ]; 23PartOf = [ "graphical-session.target" ]; 24}; 25 26Service = { 27Type = "oneshot" ; 28RemainAfterExit = true ; 29ExecStart = " ${ pkgs . numlockx } /bin/numlockx" ; 30}; 31 32Install = { WantedBy = [ "graphical-session.target" ]; }; 33}; 34}; 35}