mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
feat(nixpak): sandbox Steam and Heroic in ~/Gaming (#520)
* feat(nixpak): sandbox Steam and Heroic in ~/Gaming idols-ai stops preserving ~/.local/share/Steam, ~/.steam, ~/.config/heroic and their game data, which must be moved into ~/Gaming before deploying. Assisted-by: DeepSeek Harness (deepseek-flash) * refactor(nixpak): replace steam-fix.nu with sandboxed protontricks Assisted-by: DeepSeek Harness (claude-opus-5-5) * fix(nixpak): hide host documents and GTK config from game sandboxes Assisted-by: DeepSeek Harness (claude-opus-5-5) * docs(ai): locate the Steam library under ~/Gaming Assisted-by: DeepSeek Harness (claude-opus-5-5) * fix(umu-game): confine writes to ~/Gaming and keep foreign entries Assisted-by: DeepSeek Harness (claude-opus-5-5) * fix(nixpak): keep Steam and Heroic in the application launcher The wrappers only carried bin/, so neither launcher had a desktop entry after replacing programs.steam. Assisted-by: DeepSeek Harness (deepseek-flash) * fix(nixpak): give the game sandboxes a fontconfig that sees CJK fonts Steam rendered Chinese as tofu: the FHS layers build their own /etc/fonts, whose config lists only DejaVu and the XDG font directory, so neither the host fonts nor the FHS /usr/share/fonts were ever scanned. Point FONTCONFIG_FILE at a small config that includes /usr/share/fonts, and ship WenQuanYi Zen Hei and Noto Sans CJK in all three FHS layers. Assisted-by: DeepSeek Harness (deepseek-flash) * fix(nixpak): grant the game launchers a StatusNotifier tray icon Steam and Heroic register a tray icon over D-Bus, and the game sandboxes granted no StatusNotifierWatcher access, so the desktop shell had nothing to show for them. Enable desktopIntegration.tray for all three launchers and teach the policy suites to expect it. Assisted-by: DeepSeek Harness (deepseek-flash) * fix(nixpak): drop the duplicate host CJK font and tidy the font overrides Steam reads the fonts inside its own FHS layer, so the system-wide wqy_zenhei added for it no longer serves any sandbox. Give gaming-policy its own comment for FONTCONFIG_FILE instead of leaving it under the compat-tool one, make the desktop-base value a default, and note the SNI tray grant in the README table. Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
1 parent
08d2ff7578
commit
b726c28c14
25 files changed
+520
-214
No files matched your search
@@ -23,35 +23,17 @@ in
|
||||
# Begineer Guide: <https://www.reddit.com/r/linux_gaming/wiki/faq/>
|
||||
# ==========================================================================
|
||||
|
||||
# Games installed by Steam works fine on NixOS, no other configuration needed.
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/doc/packages/steam.section.md
|
||||
programs.steam = {
|
||||
# Some location that should be persistent:
|
||||
# ~/.local/share/Steam - The default Steam install location
|
||||
# ~/.local/share/Steam/steamapps/common - The default Game install location
|
||||
# ~/.steam/root - A symlink to ~/.local/share/Steam
|
||||
# ~/.steam - Some Symlinks & user info
|
||||
enable = true;
|
||||
package = pkgs.steam;
|
||||
# https://github.com/Winetricks/winetricks
|
||||
# Whether to enable protontricks, a simple wrapper for running Winetricks commands for Proton-enabled games.
|
||||
protontricks.enable = true;
|
||||
# Whether to enable Load the extest library into Steam, to translate X11 input events to uinput events (e.g. for using Steam Input on Wayland) .
|
||||
extest.enable = true;
|
||||
fontPackages = [
|
||||
pkgs.wqy_zenhei # Need by steam for Chinese
|
||||
];
|
||||
# DW-Proton (Dawn Winery's Proton fork) carries the anti-cheat and game
|
||||
# patches that mainline Proton/GE-Proton lack, so it is what runs the anime
|
||||
# gacha games (Wuthering Waves, Honkai: Star Rail, Arknights: Endfield, ...);
|
||||
# GE-Proton is the general fallback. Both appear as compatibility tools in
|
||||
# each game's Properties -> Compatibility.
|
||||
# https://dawn.wine/dawn-winery/dwproton
|
||||
extraCompatPackages = [
|
||||
pkgs.dwproton-bin
|
||||
pkgs.proton-ge-bin
|
||||
];
|
||||
};
|
||||
# Steam runs in a nixpak sandbox (hardening/nixpaks/steam.nix) that the
|
||||
# home manager installs, so `programs.steam` is off: its `package` option
|
||||
# calls `.override` on whatever it is given, which a sandbox script cannot
|
||||
# answer, and it would install a second, unsandboxed steam plus `steam-run`.
|
||||
# What is kept from it: 32-bit graphics, which the game sandboxes mount as
|
||||
# /run/opengl-driver-32, and the controller/VR udev rules. Dropped with it:
|
||||
# `extest` (needs /dev/uinput, which no sandbox gets) and the host
|
||||
# protontricks (it would run Wine on game-writable prefixes; the umu
|
||||
# sandbox carries one instead).
|
||||
hardware.graphics.enable32Bit = true;
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
# Expose DW-Proton to umu-run: umu ignores Steam's
|
||||
# STEAM_EXTRA_COMPAT_TOOLS_PATHS, and a store path baked into a generated
|
||||
|
||||
Reference in new issue
Block a user