monado: Add amdgpu patch + disable for perso-desktop
All checks were successful
check / check (push) Successful in 34s

This commit is contained in:
Florian RICHER 2025-07-19 21:51:48 +02:00
parent 1c2010abdc
commit 00f0381893
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
3 changed files with 19 additions and 4 deletions

View file

@ -55,8 +55,6 @@
printing.enable = true;
steering-wheel.enable = true;
};
services.monado.enable = true;
};
chaotic.mesa-git = {

View file

@ -9,8 +9,6 @@
kitty.enable = true;
};
configs.monado.enable = true;
editors = {
neovim.enable = true;
vscode.enable = true;

View file

@ -2,6 +2,7 @@
with lib;
let
cfgAmdgpu = config.modules.system.hardware.graphics.amdgpu;
cfg = config.modules.system.services.monado;
in
{
@ -9,8 +10,15 @@ in
enable = mkEnableOption ''
Enable monado with my custom configurations
'';
enableAmdgpuPatch = mkOption {
type = types.bool;
description = "Patch kernel to disable CAP_SYS_NICE on amdgpu. Required to allow high priority queues.";
default = cfgAmdgpu.enable;
};
};
config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/VR
# https://github.com/NixOS/nixpkgs/issues/258196
services.monado = {
enable = true;
@ -28,5 +36,16 @@ in
XRT_COMPOSITOR_COMPUTE = "1";
WMR_HANDTRACKING = "0";
};
boot.kernelPatches = mkIf cfg.enableAmdgpuPatch [
{
name = "amdgpu-ignore-ctx-privileges";
patch = pkgs.fetchpatch {
name = "cap_sys_nice_begone.patch";
url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
};
}
];
};
}