Files
nix-config/modules/graphical/gpu-screen-recorder-ui.nix
2025-05-31 13:32:47 +02:00

47 lines
1010 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.custom.graphical.gpu-screen-recorder-ui;
package = cfg.package.override {
inherit (config.security) wrapperDir;
};
in
{
options = {
custom.graphical.gpu-screen-recorder-ui = {
package = lib.mkPackageOption pkgs "gpu-screen-recorder-ui" { };
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to install gpu-screen-recorder-ui and generate setcap
wrappers for global hotkeys.
'';
};
};
};
config = lib.mkIf cfg.enable {
programs.gpu-screen-recorder.enable = lib.mkDefault true;
environment.systemPackages = [ package ];
systemd.packages = [ package ];
security.wrappers."gsr-global-hotkeys" = {
owner = "root";
group = "root";
capabilities = "cap_setuid+ep";
source = lib.getExe' package "gsr-global-hotkeys";
};
};
meta.maintainers = with lib.maintainers; [ js6pak ];
}