fix(gsr): separate binaries to fix cap problem
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-04 20:36:49 -05:00
parent e2c14d000c
commit 685825fb07
2 changed files with 13 additions and 6 deletions

View file

@ -11,7 +11,7 @@
cfgDesktop = config.roles.desktop;
gsr = self.packages.${pkgs.system}.gpu-screen-recorder;
pkg = self.packages.${pkgs.system}.gpu-screen-recorder;
hyprPkgs = config.home-manager.users.${mainUser}.wayland.windowManager.hyprland.finalPackage;
in {
security.wrappers = {
@ -19,21 +19,19 @@ in {
owner = "root";
group = "video";
capabilities = "cap_sys_nice+ep";
source = "${gsr}/bin/gpu-screen-recorder";
source = "${pkg.gsr}/bin/gpu-screen-recorder";
};
gsr-kms-server = {
owner = "root";
group = "video";
capabilities = "cap_sys_admin+ep";
source = "${gsr}/bin/gsr-kms-server";
source = "${pkg.kms}/bin/gsr-kms-server";
};
};
home-manager.users.${mainUser} = {
home.packages = [
gsr
(pkgs.writeShellApplication {
name = "gpu-save-replay";
runtimeInputs = [pkgs.procps];
@ -55,7 +53,7 @@ in {
gpu-screen-recorder ${concatStringsSep " " [
''-v no''
''-r 1200''
''-mf yes''
''-df yes''
''-o /home/matt/Videos/Replay''
# Audio settings
''-ac aac''

View file

@ -69,8 +69,17 @@ in
libglvnd
]
}"
# This is needed to force gsr to lookup kms in PATH
# to get the security wrapper
mkdir -p $gsr $kms/bin
cp -r $out/bin $gsr
mv $gsr/bin/gsr-kms-server $kms/bin
rm $out/bin/gsr-kms-server
'';
outputs = ["out" "gsr" "kms"];
meta = {
description = "Screen recorder that has minimal impact on system performance by recording a window using the GPU only";
homepage = "https://git.dec05eba.com/gpu-screen-recorder/about/";