mirror of
https://github.com/nix-community/home-manager
synced 2024-11-15 23:59:45 +01:00
9b1b55ba02
- Add evanjs to CODEOWNERS for numlock and numlock test - Add evanjs to maintainers for numlock module
31 lines
646 B
Nix
31 lines
646 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.xsession.numlock;
|
|
|
|
in {
|
|
meta.maintainers = [ maintainers.evanjs ];
|
|
|
|
options = { xsession.numlock.enable = mkEnableOption "Num Lock"; };
|
|
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.numlockx = {
|
|
Unit = {
|
|
Description = "NumLockX";
|
|
After = [ "graphical-session-pre.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Service = {
|
|
Type = "oneshot";
|
|
RemainAfterExit = true;
|
|
ExecStart = "${pkgs.numlockx}/bin/numlockx";
|
|
};
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
};
|
|
};
|
|
}
|