mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-19 06:08:17 +01:00
fix(steam): nixpak rules
This commit is contained in:
1 parent
41c6e49007
commit
0d32ba60db
4 files changed
+16
-4
No files matched your search
@@ -51,6 +51,7 @@ A setting that works around a bug or a hardware quirk.
|
||||
| WA-048 | Nixpak GUI fontconfig comes from the host — `hardening/nixpaks/modules/desktop-base.nix` | Nixpak normally generates a standalone `/etc/fonts` and font package list for each sandbox; that bypasses the host `defaultFonts` and made browser chrome, Telegram, QQ and other sandboxed apps choose a different CJK fallback from the host. The wrapper now disables Nixpak fonts and bind-mounts `/etc/static/fonts` at `/etc/fonts`, so sandboxed GUI apps reuse the host font packages and family preferences through the already-mounted `/nix/store`. | Drop once Nixpak can directly reuse the host fontconfig or no longer overrides `/etc/fonts`, then remove the bind and restore the library-supported configuration path | 2026-11-01 | on a nixpak update | active |
|
||||
| WA-049 | none — superseded by pointing `npmRegistryOverrides` at a mirror whose path avoids the join (`outputs/default.nix`) | nixpkgs joins an `npmRegistryOverrides` mirror's path (`/` for a bare host) with the request path, so `fetchNpmDeps` requests `https://registry.npmmirror.com//<pkg>`, which npmmirror answers with 404 (npmjs tolerates `//`); every npm-deps fetch that misses the binary caches fails. Only `fetchNpmDeps` (fixed-output) gets the patched copy: `npmConfigHook` is a build input of every npm package, so patching the shared `prefetch-npm-deps` would change all their output paths | Drop once nixpkgs' `prefetch-npm-deps/src/util.rs` joins the paths without doubling the slash | 2026-11-03 | on a nixpkgs bump | removed |
|
||||
| WA-050 | polkit agent-helper sandbox opened for pam_u2f — `modules/nixos/desktop/canokey.nix` | nixpkgs relaxes `polkit-agent-helper@`'s `PrivateDevices`/`ProtectHome` for pam_u2f only when the global `security.pam.u2f.enable` is set; this repo enables U2F per service (sudo, polkit-1) so other PAM services keep the password, and without the override pam_u2f cannot reach `/dev/hidraw*` and polkit silently falls back to the password | Drop once nixpkgs' `polkit.nix` also checks per-service `u2f.enable` | 2026-11-09 | on a nixpkgs bump | active |
|
||||
| WA-051 | Steam on the raw session bus, nixpak's D-Bus proxy off — `hardening/nixpaks/steam.nix` | Steam's SteamRT3 client starts pressure-vessel, which wraps any bus path other than `$XDG_RUNTIME_DIR/bus` in a second D-Bus proxy; the launcher-service RPC (`steam-runtime-launch-client --alongside-steam -- lspci`) never crosses that nesting, so the client hangs before its window with no error. On the standard path pressure-vessel binds the bus directly and Steam starts; the cost is that Steam can reach every name on the session bus | Drop once nixpak can expose its proxy at `$XDG_RUNTIME_DIR/bus` (or pressure-vessel stops nesting proxies), so the filtered bus comes back | 2026-11-14 | on a nixpak or Steam client update | active |
|
||||
|
||||
If the KINGBANK KP260 NVMe freezes on `ai` recur (formerly WA-008, now back at the kernel's APST
|
||||
defaults), restore the parameters commented out in `hosts/idols-ai/hardware-configuration.nix` —
|
||||
|
||||
@@ -35,8 +35,11 @@ let
|
||||
binPath = "bin/steam";
|
||||
};
|
||||
flatpak = { inherit appId; };
|
||||
# The SteamRT3 re-exec registers steam-runtime-launcher-service on this name.
|
||||
dbus.policies."com.steampowered.PressureVessel.*" = "own";
|
||||
# Steam's SteamRT3 client runs pressure-vessel, which wraps a bus at any
|
||||
# path other than $XDG_RUNTIME_DIR/bus in a second proxy; the
|
||||
# launcher-service RPC deadlocks across that nesting. WA-051.
|
||||
dbus.enable = false;
|
||||
bubblewrap.bind.rw = [ "$XDG_RUNTIME_DIR/bus" ];
|
||||
};
|
||||
};
|
||||
exe = lib.getExe wrapped.config.script;
|
||||
|
||||
@@ -149,7 +149,12 @@ let
|
||||
sharedHome = lib.elem [ "$HOME/Gaming" "$HOME" ] rw;
|
||||
noXdgStorage = !app.xdgStorage.enable;
|
||||
writableScope = lib.all (
|
||||
path: path == "$HOME/Gaming" || path == "$XDG_RUNTIME_DIR/nixpak-${app.flatpak.appId}-tmp"
|
||||
path:
|
||||
path == "$HOME/Gaming"
|
||||
|| path == "$XDG_RUNTIME_DIR/nixpak-${app.flatpak.appId}-tmp"
|
||||
# Without the nixpak bus proxy the sandbox needs the session bus socket
|
||||
# itself (WA-051).
|
||||
|| (!app.dbus.enable && path == "$XDG_RUNTIME_DIR/bus")
|
||||
) (sources app.bubblewrap.bind.rw);
|
||||
noHostHomeReads =
|
||||
!lib.any (
|
||||
@@ -185,7 +190,7 @@ let
|
||||
forbiddenMountFor = path: forbiddenMount path && !lib.elem path allowedVideoDevices;
|
||||
checks = {
|
||||
"${name}/clearEnv" = app.bubblewrap.clearEnv;
|
||||
"${name}/dbus" = app.dbus.enable;
|
||||
"${name}/dbus" = app.dbus.enable == (spec.dbus or true);
|
||||
"${name}/noRawPipewire" = !app.bubblewrap.sockets.pipewire || (spec.allowPipewire or false);
|
||||
"${name}/noForbiddenDbus" = !lib.any forbiddenDbus app.dbus.args;
|
||||
"${name}/noBroadKeyring" =
|
||||
|
||||
@@ -10,5 +10,8 @@ mkAppPolicy "steam" {
|
||||
x11 = true;
|
||||
tray = true;
|
||||
notifications = false;
|
||||
# WA-051: pressure-vessel nests its own bus proxy over nixpak's filtered one
|
||||
# and the launcher-service RPC deadlocks, so Steam uses the session bus.
|
||||
dbus = false;
|
||||
extraChecks = gamingChecks "steam";
|
||||
}
|
||||
Reference in new issue
Block a user