From a9dd12c333095db6e02516f57da7b94dabc8d611 Mon Sep 17 00:00:00 2001 From: Sean Kovacs Date: Mon, 16 Mar 2026 12:05:19 -0400 Subject: [PATCH] changes to gamescope --- flake.lock | 8 ++++---- flake.nix | 2 +- packages/gamescope/default.nix | 28 ++++++++++++++++++++++++++++ packages/overlay.nix | 1 + system/default.nix | 12 +++++++++++- 5 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 packages/gamescope/default.nix diff --git a/flake.lock b/flake.lock index 666ac71..a2c2772 100644 --- a/flake.lock +++ b/flake.lock @@ -229,17 +229,17 @@ "niri-blur": { "flake": false, "locked": { - "lastModified": 1772873838, - "narHash": "sha256-pFh7J2fBqsZvZrD26zfOj30qTM8+7PLZsNSLX+VOcUA=", + "lastModified": 1772514470, + "narHash": "sha256-nSrfHwbjg8/Rfx5pqDqU8bL5IWh99MsvxfjNZYxqEFw=", "owner": "niri-wm", "repo": "niri", - "rev": "5393902dd22e9d540438ee178775f1e488eea724", + "rev": "c837d944f0cc08580ee86574dd0c3a68ca9379a4", "type": "github" }, "original": { "owner": "niri-wm", - "ref": "wip/branch", "repo": "niri", + "rev": "c837d944f0cc08580ee86574dd0c3a68ca9379a4", "type": "github" } }, diff --git a/flake.nix b/flake.nix index e7d4f3b..f4165ce 100644 --- a/flake.nix +++ b/flake.nix @@ -30,7 +30,7 @@ }; niri-blur = { - url = "github:niri-wm/niri/wip/branch"; + url = "github:niri-wm/niri/c837d944f0cc08580ee86574dd0c3a68ca9379a4"; flake = false; }; diff --git a/packages/gamescope/default.nix b/packages/gamescope/default.nix new file mode 100644 index 0000000..30f39c2 --- /dev/null +++ b/packages/gamescope/default.nix @@ -0,0 +1,28 @@ +{ + gamescope, + fetchFromGitHub, +}: + +let + rev = "9416ca9334da7ff707359e5f6aa65dcfff66aa01"; +in +gamescope.overrideAttrs (oldAttrs: { + version = "unstable-20251206105151-9416ca"; + NIX_CFLAGS_COMPILE = [ "-fno-fast-math" ]; + + src = fetchFromGitHub { + inherit rev; + owner = "ValveSoftware"; + repo = "gamescope"; + fetchSubmodules = true; + hash = "sha256-bZXyNmhLG1ZcD9nNKG/BElp6I57GAwMSqAELu2IZnqA="; + }; + + # Unsure if this bit is necessary, though I guess it's nice to have the version gamescope shows match + postPatch = (oldAttrs.postPatch or "") + '' + substituteInPlace src/meson.build \ + --replace-fail "'git', 'describe', '--always', '--tags', '--dirty=+'" "'echo', '${rev}'" + + patchShebangs default_extras_install.sh + ''; +}) diff --git a/packages/overlay.nix b/packages/overlay.nix index 5346aea..e84f9c9 100644 --- a/packages/overlay.nix +++ b/packages/overlay.nix @@ -1,6 +1,7 @@ final: prev: { spotify-webapp = final.callPackage ./spotify-webapp { }; bibata-cursor = final.callPackage ./bibata-cursor { }; + gamescope-unstable = final.callPackage ./gamescope { }; openmw-unstable = prev.openmw.overrideAttrs (oldAttrs: { pname = "openmw"; diff --git a/system/default.nix b/system/default.nix index 6567f0f..262f886 100755 --- a/system/default.nix +++ b/system/default.nix @@ -51,8 +51,18 @@ programs = { gamescope = { enable = true; - capSysNice = true; + package = pkgs.gamescope-unstable; + capSysNice = false; + args = [ + "--output-width 3840" + "--nested-width 3840" + "--output-height 2160" + "--nested-height 2160" + "--expose-wayland" + "--fullscreen" + ]; }; + gamemode.enable = true; gnupg.agent = { enable = true; enableSSHSupport = true;