From 1e80216b075f246c2ec2c28ff855e434d08af907 Mon Sep 17 00:00:00 2001 From: alexion Date: Sat, 1 Aug 2026 23:33:09 -0400 Subject: [PATCH] feat(steam): add Steam desktop module --- AGENTS.md | 5 +++++ hosts/neogaia/default.nix | 1 + modules/desktop/hyprland/hyprland.nix | 4 ++++ modules/desktop/steam.nix | 24 ++++++++++++++++++++++++ modules/desktop/waybar.nix | 1 + 5 files changed, 35 insertions(+) create mode 100644 modules/desktop/steam.nix diff --git a/AGENTS.md b/AGENTS.md index 3a61264..042ecc9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -83,3 +83,8 @@ The domain model (Host, Module, Skeleton, Auto-loader, Enable convention, overla - Pi's tool discovery checks `~/.pi/agent/bin` before `PATH`, and downloaded generic Linux binaries there can be unusable on NixOS with the stub-ld error. This flake patches Pi to validate local tool binaries before selecting them, so it falls back to usable `fd`/`rg` from `PATH` instead. Stale unpatched launchers are the remaining failure mode for broken `@` autocomplete. +- Nix flake evaluation ignores untracked files in this checkout. + Keep a new auto-loaded module staged or committed until it is removed, otherwise `nix flake check` and `nixos-rebuild --flake` evaluate without it and report its options as missing. +- The current Steam desktop client is an XWayland application. + Its CEF windows do not support Ozone and Steam composites them into an SDL surface with X11 extensions, so SDL Wayland selectors do not make the visible client native Wayland. + Keep fractional scaling sharp with Hyprland's `xwayland.force_zero_scaling` and Steam's own `STEAM_FORCE_DESKTOPUI_SCALING` instead. diff --git a/hosts/neogaia/default.nix b/hosts/neogaia/default.nix index e52c87d..ffe3911 100644 --- a/hosts/neogaia/default.nix +++ b/hosts/neogaia/default.nix @@ -71,6 +71,7 @@ modules.desktop.enable = true; modules.desktop.obsidian.enable = true; + modules.desktop.steam.enable = true; time.timeZone = "America/New_York"; i18n.defaultLocale = "en_GB.UTF-8"; diff --git a/modules/desktop/hyprland/hyprland.nix b/modules/desktop/hyprland/hyprland.nix index 6709262..38ab7a9 100644 --- a/modules/desktop/hyprland/hyprland.nix +++ b/modules/desktop/hyprland/hyprland.nix @@ -112,6 +112,10 @@ in blur.enabled = cfg.blur; }; + # XWayland clients render at the panel's native resolution instead of + # being raster-scaled by the compositor at the fractional monitor scale. + xwayland.force_zero_scaling = true; + animations = { enabled = true; bezier = [ "ease, 0.25, 0.1, 0.25, 1.0" ]; diff --git a/modules/desktop/steam.nix b/modules/desktop/steam.nix new file mode 100644 index 0000000..3a3e179 --- /dev/null +++ b/modules/desktop/steam.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + ... +}: +# Steam game launcher and runtime integration. +let + cfg = config.modules.desktop.steam; +in +{ + options.modules.desktop.steam.enable = lib.mkEnableOption "Steam game launcher"; + + config = lib.mkIf cfg.enable { + programs.steam = { + enable = true; + package = pkgs.steam.override { + extraEnv.STEAM_FORCE_DESKTOPUI_SCALING = "1.5"; + }; + }; + + hardware.steam-hardware.enable = true; + }; +} diff --git a/modules/desktop/waybar.nix b/modules/desktop/waybar.nix index 7a63306..0f5cee7 100644 --- a/modules/desktop/waybar.nix +++ b/modules/desktop/waybar.nix @@ -83,6 +83,7 @@ in "class" = g "f268"; "class<[Cc]ode>" = g "f121"; "class" = g "f02d"; + "class<[Ss]team>" = g "f1b6"; }; };