2020-03-23 14:17:37 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.wshowkeys;
|
|
|
|
in {
|
|
|
|
meta.maintainers = with maintainers; [ primeos ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.wshowkeys = {
|
|
|
|
enable = mkEnableOption (lib.mdDoc ''
|
|
|
|
wshowkeys (displays keypresses on screen on supported Wayland
|
|
|
|
compositors). It requires root permissions to read input events, but
|
|
|
|
these permissions are dropped after startup'');
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-09-12 16:53:48 +00:00
|
|
|
security.wrappers.wshowkeys =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.wshowkeys}/bin/wshowkeys";
|
|
|
|
};
|
2020-03-23 14:17:37 +00:00
|
|
|
};
|
|
|
|
}
|