add shadowplay (basically)
This commit is contained in:
@@ -27,5 +27,6 @@
|
||||
./xfce.nix
|
||||
./basics.nix
|
||||
./sway.nix
|
||||
./gpu-screen-recorder-ui.nix
|
||||
];
|
||||
}
|
||||
|
||||
46
modules/graphical/gpu-screen-recorder-ui.nix
Normal file
46
modules/graphical/gpu-screen-recorder-ui.nix
Normal 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 ];
|
||||
}
|
||||
Reference in New Issue
Block a user