mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 10:14:48 +00:00
nixos/gpu-screen-recorder: add UI option with UI and notification package
add option for ui.enable to install gsr-ui package and setup correct set_cap for hotkeys
(cherry picked from commit 790b039197)
This commit is contained in:
committed by
github-actions[bot]
parent
9fec61a048
commit
ea2cc05cf5
@@ -10,6 +10,11 @@ let
|
||||
package = cfg.package.override {
|
||||
inherit (config.security) wrapperDir;
|
||||
};
|
||||
|
||||
uiPackage = cfg.ui.package.override {
|
||||
gpu-screen-recorder = package;
|
||||
inherit (config.security) wrapperDir;
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
@@ -24,19 +29,47 @@ in
|
||||
wrappers for promptless recording.
|
||||
'';
|
||||
};
|
||||
|
||||
ui = {
|
||||
enable = lib.mkEnableOption "the GPU Screen Recorder overlay UI";
|
||||
package = lib.mkPackageOption pkgs "gpu-screen-recorder-ui" { };
|
||||
notifPackage = lib.mkPackageOption pkgs "gpu-screen-recorder-notification" { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
security.wrappers."gsr-kms-server" = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_sys_admin+ep";
|
||||
source = lib.getExe' package "gsr-kms-server";
|
||||
};
|
||||
};
|
||||
security.wrappers."gsr-kms-server" = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_sys_admin+ep";
|
||||
source = lib.getExe' package "gsr-kms-server";
|
||||
};
|
||||
}
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ timschumi ];
|
||||
(lib.mkIf cfg.ui.enable {
|
||||
environment.systemPackages = [
|
||||
cfg.ui.package
|
||||
cfg.ui.notifPackage
|
||||
];
|
||||
|
||||
security.wrappers."gsr-global-hotkeys" = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_setuid+ep";
|
||||
source = lib.getExe' uiPackage "gsr-global-hotkeys";
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
timschumi
|
||||
AhmedAmr
|
||||
keenanweaver
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user