feat(hosts): add lyrathorpe-console, a living-room games machine #99

Open
lyrathorpe wants to merge 1 commits from feat/console-host into main
Owner

What

Adds a new x86_64 NixOS host, lyrathorpe-console: a 4th-gen Core i7 (Haswell)
with a GTX 1070 8 GB, wired to a television and driven with a Bluetooth
controller. Keyboard and mouse are supported but secondary.

New files under hosts/Console/: configuration.nix, nvidia.nix,
gaming.nix, hardware-configuration.nix. Prose in docs/hosts/console.md,
plus the host-table entry, unfree allowlist additions and README row.

Session model

greetd gets an initial_session, so the machine autologins into the gamescope
Steam session at boot — no greeter, no keyboard. Quitting Steam falls back to
greetd's default_session (ReGreet), where the ordinary Sway session is
available. Both are real sessions; services.greetd.restart defaults to false
once initial_session is set, which is what stops a logout looping back into
autologin.

Graphics

The GTX 1070 is Pascal (GP104), so it needs driver branch 580
(nvidiaPackages.legacy_580) — the same constraint as the Mac Pro's Quadro
P400. The nixpkgs default (production, 595.x) dropped Maxwell/Pascal/Volta and
will not drive the card.

Games

  • RetroArch via retroarch-bare.wrapper with 17 cores: NES through PS2, plus
    GameCube/Wii (dolphin) and PS2 (pcsx2). Menu toggle bound to L3+R3 —
    without a pad combo there is no way to exit a running core on a machine with
    no keyboard.
  • Clone Hero.
  • Steam with the gamescope session, Proton-GE via extraCompatPackages, and
    protontricks.
  • Controllers: xpadneo for Xbox pads over Bluetooth; wired Xbox 360 pads,
    DualSense/DS4 and Clone Hero guitars are all handled in-kernel and need no
    configuration. hardware.xone is deliberately left off — it blacklists
    xpad, which would break the 360 pads.

Proton prerequisites

Most of it programs.steam already arranges (32-bit graphics, udev rules,
32-bit PipeWire, Wine's fonts). Two gaps closed explicitly:

  • esync's file-descriptor hard limit raised from systemd's default 524288 to
    1048576. Soft limit untouched, since lifting that breaks select()-based
    programs elsewhere.
  • Proton-GE wired in via extraCompatPackages, which puts its steamcompattool
    output on STEAM_EXTRA_COMPAT_TOOLS_PATHS.

vm.max_map_count is already 1048576 in the nixpkgs defaults and needs no
override. Enabling Steam Play remains a client-side setting Nix cannot reach;
noted in the docs.

Games library

Content lives in /srv/games, created by systemd.tmpfiles at boot: one
directory per system under roms/ using the libretro/ES-DE naming convention,
plus bios/, saves/, states/, playlists/, screenshots/, thumbnails/,
a Steam library folder and Clone Hero's songs. Mode 2775 lyrathorpe:users;
the setgid bit keeps group ownership consistent for files arriving over rsync.
RetroArch is pointed at it declaratively; Steam and Clone Hero need telling once
in their own UIs.

Caveats

  • hardware-configuration.nix is a placeholder, not a hardware scan — the
    machine is not installed yet. It assumes partition labels nixos and BOOT
    and must be replaced with nixos-generate-config output before install.
  • gamescope on the proprietary NVIDIA driver uses the standard
    GBM_BACKEND=nvidia-drm recipe, but the combination is untested on this
    hardware. Recovery path is documented.
  • The dolphin and pcsx2 libretro cores lag their standalone builds; the docs
    name the change to swap in dolphin-emu/pcsx2 proper if needed.
  • PS2, Saturn and Dreamcast cores need BIOS dumps, which are not packaged.

Validation

  • nix flake check passes (formatting, deadnix, statix, pre-commit).
  • All six NixOS hosts still evaluate; lyrathorpe-console evaluates to a
    toplevel derivation.
  • Spot-checked the derived config: hardware.graphics.enable32Bit,
    hardware.steam-hardware.enable, services.pipewire.alsa.support32Bit,
    the gamescope setcap wrapper, the registered steam.desktop session, the
    greetd initial_session, hid_xpadneo in boot.kernelModules, and the
    generated tmpfiles rules.
  • Kernel config confirmed to carry CONFIG_JOYSTICK_XPAD=m,
    CONFIG_JOYSTICK_XPAD_FF=y and CONFIG_JOYSTICK_XPAD_LEDS=y, with xpad
    absent from boot.blacklistedKernelModules.
  • RetroArch config keys verified against upstream configuration.c at v1.22.2
    (an unrecognised key in an appended config is ignored silently).
  • Nothing has been built or booted — evaluation only.
## What Adds a new x86_64 NixOS host, `lyrathorpe-console`: a 4th-gen Core i7 (Haswell) with a GTX 1070 8 GB, wired to a television and driven with a Bluetooth controller. Keyboard and mouse are supported but secondary. New files under `hosts/Console/`: `configuration.nix`, `nvidia.nix`, `gaming.nix`, `hardware-configuration.nix`. Prose in `docs/hosts/console.md`, plus the host-table entry, unfree allowlist additions and README row. ## Session model greetd gets an `initial_session`, so the machine autologins into the gamescope Steam session at boot — no greeter, no keyboard. Quitting Steam falls back to greetd's `default_session` (ReGreet), where the ordinary Sway session is available. Both are real sessions; `services.greetd.restart` defaults to `false` once `initial_session` is set, which is what stops a logout looping back into autologin. ## Graphics The GTX 1070 is Pascal (GP104), so it needs driver branch 580 (`nvidiaPackages.legacy_580`) — the same constraint as the Mac Pro's Quadro P400. The nixpkgs default (`production`, 595.x) dropped Maxwell/Pascal/Volta and will not drive the card. ## Games - RetroArch via `retroarch-bare.wrapper` with 17 cores: NES through PS2, plus GameCube/Wii (`dolphin`) and PS2 (`pcsx2`). Menu toggle bound to L3+R3 — without a pad combo there is no way to exit a running core on a machine with no keyboard. - Clone Hero. - Steam with the gamescope session, Proton-GE via `extraCompatPackages`, and protontricks. - Controllers: `xpadneo` for Xbox pads over Bluetooth; wired Xbox 360 pads, DualSense/DS4 and Clone Hero guitars are all handled in-kernel and need no configuration. `hardware.xone` is deliberately left off — it blacklists `xpad`, which would break the 360 pads. ## Proton prerequisites Most of it `programs.steam` already arranges (32-bit graphics, udev rules, 32-bit PipeWire, Wine's fonts). Two gaps closed explicitly: - esync's file-descriptor hard limit raised from systemd's default 524288 to 1048576. Soft limit untouched, since lifting that breaks `select()`-based programs elsewhere. - Proton-GE wired in via `extraCompatPackages`, which puts its `steamcompattool` output on `STEAM_EXTRA_COMPAT_TOOLS_PATHS`. `vm.max_map_count` is already 1048576 in the nixpkgs defaults and needs no override. Enabling Steam Play remains a client-side setting Nix cannot reach; noted in the docs. ## Games library Content lives in `/srv/games`, created by `systemd.tmpfiles` at boot: one directory per system under `roms/` using the libretro/ES-DE naming convention, plus `bios/`, `saves/`, `states/`, `playlists/`, `screenshots/`, `thumbnails/`, a Steam library folder and Clone Hero's songs. Mode 2775 `lyrathorpe:users`; the setgid bit keeps group ownership consistent for files arriving over rsync. RetroArch is pointed at it declaratively; Steam and Clone Hero need telling once in their own UIs. ## Caveats - `hardware-configuration.nix` is a **placeholder**, not a hardware scan — the machine is not installed yet. It assumes partition labels `nixos` and `BOOT` and must be replaced with `nixos-generate-config` output before install. - gamescope on the proprietary NVIDIA driver uses the standard `GBM_BACKEND=nvidia-drm` recipe, but the combination is untested on this hardware. Recovery path is documented. - The `dolphin` and `pcsx2` libretro cores lag their standalone builds; the docs name the change to swap in `dolphin-emu`/`pcsx2` proper if needed. - PS2, Saturn and Dreamcast cores need BIOS dumps, which are not packaged. ## Validation - `nix flake check` passes (formatting, deadnix, statix, pre-commit). - All six NixOS hosts still evaluate; `lyrathorpe-console` evaluates to a toplevel derivation. - Spot-checked the derived config: `hardware.graphics.enable32Bit`, `hardware.steam-hardware.enable`, `services.pipewire.alsa.support32Bit`, the gamescope setcap wrapper, the registered `steam.desktop` session, the greetd `initial_session`, `hid_xpadneo` in `boot.kernelModules`, and the generated tmpfiles rules. - Kernel config confirmed to carry `CONFIG_JOYSTICK_XPAD=m`, `CONFIG_JOYSTICK_XPAD_FF=y` and `CONFIG_JOYSTICK_XPAD_LEDS=y`, with `xpad` absent from `boot.blacklistedKernelModules`. - RetroArch config keys verified against upstream `configuration.c` at v1.22.2 (an unrecognised key in an appended config is ignored silently). - Nothing has been built or booted — evaluation only.
lyrathorpe added 1 commit 2026-08-21 17:10:24 +01:00
feat(hosts): add lyrathorpe-console, a living-room games machine
CI / flake (push) Skipped
CI / flake (pull_request) Successful in 7m46s
39434b3929
New x86_64 host for a 4th-gen Core i7 (Haswell) with a GTX 1070 8 GB,
wired to a television and driven with a Bluetooth controller.

Session: greetd gets an initial_session, so the machine autologins into
the gamescope Steam session at boot with no greeter and no keyboard.
Quitting Steam falls back to greetd's default_session (ReGreet), where
the ordinary Sway session is available for keyboard-and-mouse work.

Graphics: the GTX 1070 is Pascal, so it needs driver branch 580
(nvidiaPackages.legacy_580) like the Mac Pro's Quadro P400 -- the
nixpkgs default (production, 595.x) dropped Pascal support.

Games: RetroArch built through retroarch-bare.wrapper with 17 cores
covering NES through PS2, GameCube and Wii; Clone Hero; and Steam with
Proton-GE and protontricks. RetroArch's menu toggle is bound to L3+R3,
without which there is no way to exit a running core on a machine with
no keyboard.

Proton prerequisites beyond what programs.steam already arranges: the
esync file-descriptor hard limit is raised from systemd's default
524288 to 1048576 (soft limit untouched), and Proton-GE is wired in via
extraCompatPackages. vm.max_map_count already defaults high enough in
nixpkgs and needs no override.

Content lives in a shared /srv/games tree created by systemd.tmpfiles,
laid out one directory per system under roms/ using the libretro/ES-DE
naming convention, plus bios/, saves/, states/, a Steam library folder
and Clone Hero's songs. RetroArch is pointed at it declaratively.

hardware-configuration.nix is a placeholder, not a hardware scan: the
machine is not installed yet. It assumes partition labels `nixos` and
`BOOT` and must be replaced with nixos-generate-config output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All checks were successful
CI / flake (push) Skipped
Required
CI / flake (pull_request) Successful in 7m46s
Required
Details
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/console-host:feat/console-host
git checkout feat/console-host
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lyrathorpe/nixfiles#99