update system

This commit is contained in:
2025-09-30 09:48:38 +02:00
parent 4a6c182385
commit c1145e6319
8 changed files with 196 additions and 4 deletions

View File

@@ -53,6 +53,7 @@
rquickshare = prev.callPackage ./overlays/rquickshare { };
rastertokpsl-re = prev.callPackage ./overlays/rastertokpsl-re { };
usb-sniffer = prev.callPackage ./overlays/usb-sniffer { };
gamma-launcher = prev.callPackage ./overlays/gamma-launcher { };
wireshark = prev.wireshark.overrideAttrs (
finalAttrs: prevAttrs: {
postInstall = prevAttrs.postInstall + ''

View File

@@ -14,6 +14,7 @@
blueman
kdePackages.okular
bitbox
gamma-launcher
];
};
systemd.user.services = {

View File

@@ -19,6 +19,7 @@
./hardware/amdgpu.nix
./hardware/cc1.nix
./hardware/fv43u.nix
./hardware/pimax.nix
./hardware/q3279vwf.nix
./hardware/virtual-camera.nix

View File

@@ -15,7 +15,7 @@ in
enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
hdr = mkOption {
type = types.bool;
default = true;
default = false;
description = "Enable HDR support for the Gigabyte FV43U monitor.";
};
};
@@ -64,9 +64,9 @@ in
scale = 1;
bitdepth = 10;
addreserved = "340,0,0,0";
cm = if cfg.hdr then "hdr" else "srgb";
cm = if cfg.hdr then "hdredid" else "srgb";
sdr_min_luminance = 0.25;
sdr_max_luminance = 400;
sdr_max_luminance = 250;
};
xwayland.force_zero_scaling = true;
misc.vrr = 2; # VA suffers from VRR flicker

View File

@@ -0,0 +1,92 @@
{
pkgs,
lib,
config,
username,
...
}:
with lib;
let
cfg = config.hardware.pimax;
in
{
options.hardware.pimax = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable (
let
monado-pimax =
# https://gitlab.freedesktop.org/Coreforge/monado/-/commits/pimax?ref_type=heads
pkgs.monado.overrideAttrs {
pname = "monado-pimax";
patches = [ ];
src = pkgs.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "Coreforge";
repo = "monado";
rev = "f858ee5dd8ca7696bd9219e8278f2671df56fe6e";
hash = "sha256-Si56yvG+oSfyUaPAlF1FgB7WJo8td1xuVxYnkJvbu4o=";
};
};
monado-pimax-new =
# https://gitlab.freedesktop.org/Coreforge/monado/-/commits/pimax?ref_type=heads
pkgs.monado.overrideAttrs {
pname = "monado-pimax";
patches = [ ];
src = pkgs.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "Coreforge";
repo = "monado";
rev = "f712f680dd57753a31d2605ae1505b06f30d50eb";
hash = "sha256-ke7UXimIvPBDvBU7RV7Q8fAum5LYnHC64NLA7x3XftU=";
};
};
in
{
environment.systemPackages = with pkgs; [
opencomposite
];
home-manager.users."${username}".xdg.configFile = {
"openxr/1/active_runtime.json".source = "${monado-pimax}/share/openxr/1/openxr_monado.json";
"openvr/openvrpaths.vrpath".text = builtins.toJSON {
config = [ "~/.local/share/Steam/config" ];
external_drivers = null;
jsonid = "vrpathreg";
log = [ "~/.local/share/Steam/logs" ];
runtime = [ "${pkgs.opencomposite}/lib/opencomposite" ];
version = 1;
};
};
boot.kernelPatches = [
{
name = "pimax-quirks";
patch = ./pimax.patch;
}
{
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=";
};
}
];
services.monado = {
enable = true;
defaultRuntime = true;
highPriority = true;
package = monado-pimax;
};
systemd.user.services.monado.environment = {
STEAMVR_LH_ENABLE = "1";
XRT_COMPOSITOR_COMPUTE = "1";
};
}
);
}

View File

@@ -0,0 +1,31 @@
From 13da539f1115fe9803ea5570be0d9ec5310e404c Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Mon, 20 May 2024 18:28:39 +0200
Subject: [PATCH] drm/edid: add non-desktop quirk to Pimax VR headsets
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
---
drivers/gpu/drm/drm_edid.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 0f7c4c5b14b9..87ca0637732b 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -237,6 +237,13 @@ static const struct edid_quirk {
EDID_QUIRK('S', 'E', 'C', 0x144a, EDID_QUIRK_NON_DESKTOP),
EDID_QUIRK('A', 'U', 'S', 0xc102, EDID_QUIRK_NON_DESKTOP),
+ /* Pimax VR Headsets */
+ EDID_QUIRK('O', 'V', 'R', 0x0003, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('S', 'V', 'R', 0x1019, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('P', 'V', 'R', 0x1019, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('P', 'V', 'R', 0x101a, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('P', 'V', 'R', 0x101b, EDID_QUIRK_NON_DESKTOP),
+
/* Sony PlayStation VR Headset */
EDID_QUIRK('S', 'N', 'Y', 0x0704, EDID_QUIRK_NON_DESKTOP),
--
2.44.0

View File

@@ -39,7 +39,6 @@ in
})
rpcs3
bottles
wineWowPackages.stagingFull
wineWow64Packages.stagingFull
winetricks
protontricks

View File

@@ -0,0 +1,67 @@
{
lib,
python3Packages,
fetchFromGitHub,
unrar,
}:
python3Packages.buildPythonApplication rec {
pname = "gamma-launcher";
version = "2.5";
src = fetchFromGitHub {
owner = "Mord3rca";
repo = "gamma-launcher";
rev = "v${version}";
hash = "sha256-qzjfgDFimEL6vtsJBubY6fHsokilDB248WwHJt3F7fI=";
};
pyproject = true;
buildInputs = [ python3Packages.setuptools ];
propagatedBuildInputs = with python3Packages; [
beautifulsoup4
cloudscraper
gitpython
platformdirs
py7zr
unrardll
requests
tenacity
tqdm
(python3Packages.buildPythonPackage rec {
pname = "python-unrar";
version = "0.4";
format = "setuptools";
src = fetchFromGitHub {
owner = "matiasb";
repo = "python-unrar";
rev = "v${version}";
hash = "sha256-JeuMDwKltpp2i7rkGiQ5yAOIEtiUdfhOJGDVAGGib+A=";
};
patchPhase = ''
substituteInPlace unrar/unrarlib.py \
--replace-fail "os.environ.get('UNRAR_LIB_PATH', None)" "r'${unrar}/lib/libunrar.so'"
'';
pythonImportsCheck = [ "unrar" ];
meta = with lib; {
description = "Work with RAR archive files through unrar library using ctypes";
homepage = "https://github.com/matiasb/python-unrar";
license = licenses.gpl3;
maintainers = with maintainers; [ theaninova ];
};
})
];
meta = with lib; {
description = "This is a reimplementation of G.A.M.M.A. launcher used for the first setup";
homepage = "https://github.com/Mord3rca/gamma-launcher";
license = licenses.gpl3;
maintainers = with maintainers; [ theaninova ];
};
}