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