Skip to content

Commit

Permalink
nixos/gpu-screen-recorder-ui: init
Browse files Browse the repository at this point in the history
  • Loading branch information
js6pak committed Feb 8, 2025
1 parent 146f2ba commit d03a644
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
./programs/gpaste.nix
./programs/gphoto2.nix
./programs/gpu-screen-recorder.nix
./programs/gpu-screen-recorder-ui.nix
./programs/haguichi.nix
./programs/hamster.nix
./programs/htop.nix
Expand Down
46 changes: 46 additions & 0 deletions nixos/modules/programs/gpu-screen-recorder-ui.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
config,
lib,
pkgs,
...
}:

let
cfg = config.programs.gpu-screen-recorder-ui;
package = cfg.package.override {
inherit (config.security) wrapperDir;
};
in
{
options = {
programs.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 ];
}

0 comments on commit d03a644

Please sign in to comment.