From 9c55ea4984d64b7780911ae4ab6c47fcc9973c73 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sat, 11 Nov 2023 20:19:57 +0100 Subject: Install fixed Steam launcher in home profile This can run Cities:Skylines with "Steam Linux Runtime 1.0 (scout)" as a forced Steam compatibility tool. Installing it here is easier than launching Steam from the command line every time. --- tw/home.scm | 1 + tw/home/lap.scm | 2 +- tw/packages/games.scm | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) (limited to 'tw') diff --git a/tw/home.scm b/tw/home.scm index ebccfce9..92b1f580 100644 --- a/tw/home.scm +++ b/tw/home.scm @@ -519,6 +519,7 @@ show_border=1 (simple-service 'gui-environment home-environment-variables-service-type `(("TERMINAL" . "kitty") + ("QT_X11_NO_MITSHM" . "1") ; fixes a Steam issue: https://gitlab.com/nonguix/nonguix/-/issues/267 ("_JAVA_OPTIONS" . ,(string-append "$_JAVA_OPTIONS${_JAVA_OPTIONS:+ }-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true " diff --git a/tw/home/lap.scm b/tw/home/lap.scm index 1b8e2908..9b79fb68 100644 --- a/tw/home/lap.scm +++ b/tw/home/lap.scm @@ -32,7 +32,7 @@ #:select (signal-desktop)) #:use-module ((nongnu packages nvidia) #:select (nvidia-system-monitor)) - #:use-module ((nongnu packages steam-client) + #:use-module ((tw packages games) ; (nongnu packages steam-client) #:select (steam-nvidia)) #:use-module (tw home) #:use-module (tw services desktop) diff --git a/tw/packages/games.scm b/tw/packages/games.scm index 701f983a..b40590ba 100644 --- a/tw/packages/games.scm +++ b/tw/packages/games.scm @@ -40,9 +40,38 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix modules) #:use-module (guix packages) + #:use-module ((nongnu packages nvidia) + #:select (nvda)) + #:use-module ((nongnu packages steam-client) + #:select (steam-container)) #:use-module (nonguix build-system binary) + #:use-module ((nonguix multiarch-container) + #:select (nonguix-container nonguix-container->package ngc-union32 ngc-union64)) #:use-module ((nonguix licenses) #:prefix nonguix-license:)) + +;;; Steam + +;; TODO: revert to upstream Nonguix' `steam-nvidia-container' once +;; https://gitlab.com/nonguix/nonguix/-/merge_requests/359 is merged or libx11 +;; is ungrafted in Guix. +(define replace-mesa* + (let* ((mesa-fixed (@@ (nongnu packages steam-client) mesa-fixed)) + (mesa/nvda (package (inherit mesa) (replacement nvda))) + (mesa-fixed/nvda (package (inherit mesa-fixed) (replacement nvda)))) + (package-input-rewriting + `((,mesa . ,mesa/nvda) + (,mesa-fixed . ,mesa-fixed/nvda))))) + +(define-public steam-nvidia + (nonguix-container->package + (nonguix-container + (inherit steam-container) + ;; All .desktop files refer to an executable called "steam". + (name "steam") + (union64 (replace-mesa* (ngc-union64 steam-container))) + (union32 (replace-mesa* (ngc-union32 steam-container)))))) + ;; Simutrans -- cgit v1.2.3