2024-10-06 06:27:45 -06:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-04 16:02:21 -06:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.gpu-screen-recorder;
|
|
|
|
package = cfg.package.override {
|
|
|
|
inherit (config.security) wrapperDir;
|
|
|
|
};
|
2024-10-06 06:27:45 -06:00
|
|
|
in
|
|
|
|
{
|
2024-07-04 16:02:21 -06:00
|
|
|
options = {
|
|
|
|
programs.gpu-screen-recorder = {
|
2024-10-06 06:27:45 -06:00
|
|
|
package = lib.mkPackageOption pkgs "gpu-screen-recorder" { };
|
2024-07-04 16:02:21 -06:00
|
|
|
|
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether to install gpu-screen-recorder and generate setcap
|
|
|
|
wrappers for promptless recording.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
security.wrappers."gsr-kms-server" = {
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
capabilities = "cap_sys_admin+ep";
|
|
|
|
source = "${package}/bin/gsr-kms-server";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta.maintainers = with lib.maintainers; [ timschumi ];
|
|
|
|
}
|