mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 17:46:14 +01:00
Finally get gamescope working properly in Steam
Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
parent
89afaf89c1
commit
b284c90451
|
@ -1,9 +1,18 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
programs.gamescope = {
|
programs.gamescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
capSysNice = true;
|
# Wrappers don't work in steams FHSEnv cause security reasons (ig valid)
|
||||||
|
capSysNice = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Therefore we wrap gamescope with the capability under an alias
|
||||||
|
security.wrappers.gamescope-nice = {
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
source = "${pkgs.gamescope}/bin/gamescope";
|
||||||
|
capabilities = "cap_sys_nice+pie";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -18,6 +27,8 @@
|
||||||
p.libkrb5
|
p.libkrb5
|
||||||
p.keyutils
|
p.keyutils
|
||||||
];
|
];
|
||||||
|
# this is the worst thing I have written in ages, but it works
|
||||||
|
buildFHSEnv = x: pkgs.buildFHSEnv (x // { extraBwrapArgs = x.extraBwrapArgs ++ [ "--cap-add CAP_SYS_NICE --cap-add CAP_SETPCAP" ]; });
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue