nixpkgs/nixos/modules/programs/wshowkeys.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
675 B
Nix
Raw Normal View History

2024-04-24 13:42:02 +00:00
{
config,
lib,
pkgs,
...
}:
2020-03-23 14:17:37 +00:00
let
cfg = config.programs.wshowkeys;
2024-04-24 13:42:02 +00:00
in
{
2020-03-23 14:17:37 +00:00
options = {
programs.wshowkeys = {
2024-04-24 13:42:02 +00:00
enable = lib.mkEnableOption ''
2020-03-23 14:17:37 +00:00
wshowkeys (displays keypresses on screen on supported Wayland
compositors). It requires root permissions to read input events, but
these permissions are dropped after startup'';
2024-04-24 13:42:02 +00:00
package = lib.mkPackageOption pkgs "wshowkeys" { };
2020-03-23 14:17:37 +00:00
};
};
2024-04-24 13:42:02 +00:00
config = lib.mkIf cfg.enable {
security.wrappers.wshowkeys = {
setuid = true;
owner = "root";
group = "root";
source = lib.getExe cfg.package;
};
2020-03-23 14:17:37 +00:00
};
2024-04-24 13:42:02 +00:00
meta.maintainers = with lib.maintainers; [ primeos ];
2020-03-23 14:17:37 +00:00
}