add shadowplay (basically)

This commit is contained in:
Kopatz
2025-05-27 18:09:53 +02:00
parent b5d7cf933c
commit e2f799314f
6 changed files with 210 additions and 0 deletions

View File

@@ -27,5 +27,6 @@
./xfce.nix
./basics.nix
./sway.nix
./gpu-screen-recorder-ui.nix
];
}

View File

@@ -0,0 +1,46 @@
{
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 ];
}