feat(hosts): add lyrathorpe-console, a living-room games machine
CI / flake (push) Skipped
CI / flake (pull_request) Successful in 7m46s
CI / flake (push) Skipped
CI / flake (pull_request) Successful in 7m46s
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>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1ff333a896
commit
39434b3929
@@ -0,0 +1,54 @@
|
||||
# NVIDIA GeForce GTX 1070 8 GB (Pascal, GP104): proprietary driver for the
|
||||
# gamescope Steam session and the Sway desktop.
|
||||
#
|
||||
# Driver branch: 580 (nvidiaPackages.legacy_580), NOT the nixpkgs default
|
||||
# (`production`, currently 595.x). 580 is the last branch that supports
|
||||
# Maxwell/Pascal/Volta -- NVIDIA keeps it as an LTS branch to Aug 2028 -- and a
|
||||
# newer branch simply will not drive this card. Same constraint as the Mac Pro's
|
||||
# Quadro P400; see hosts/MacPro31/nvidia.nix.
|
||||
#
|
||||
# The driver is unfree, so it is not in the binary cache: the kernel module is
|
||||
# compiled locally on every kernel bump.
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
# Selects the proprietary driver; the module blacklists nouveau/nvidiafb and
|
||||
# loads nvidia-uvm via a modprobe softdep. Naming is historical -- this option
|
||||
# drives the kernel/driver choice on Wayland hosts too, which is why it is set
|
||||
# on a machine that runs no X server.
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.legacy_580;
|
||||
# Required for Wayland: sets nvidia-drm.modeset=1 (and fbdev=1), without
|
||||
# which neither gamescope nor wlroots gets a usable GBM device and both the
|
||||
# Steam session and Sway fail to start.
|
||||
modesetting.enable = true;
|
||||
# The open kernel modules need Turing or later; Pascal must use the closed
|
||||
# ones. Explicit because the option has no default on driver >= 560.
|
||||
open = false;
|
||||
};
|
||||
|
||||
# The NVIDIA module only puts these in boot.kernelModules when
|
||||
# services.xserver.enable is true, which is false on this Wayland-only host --
|
||||
# so load them explicitly rather than relying on udev modalias autoloading.
|
||||
# nvidia_uvm is deliberately absent: the module's modprobe softdep pulls it in
|
||||
# after the GPU device exists, which is the supported ordering.
|
||||
boot.kernelModules = [
|
||||
"nvidia"
|
||||
"nvidia_modeset"
|
||||
"nvidia_drm"
|
||||
];
|
||||
|
||||
# wlroots refuses the proprietary NVIDIA driver unless told to proceed. The
|
||||
# greeter's compositor (cage) and gamescope have no such check; only Sway
|
||||
# needs the flag, which the module bakes into the wrapper the session's
|
||||
# .desktop file runs.
|
||||
programs.sway.extraOptions = [ "--unsupported-gpu" ];
|
||||
|
||||
# 32-bit driver libraries for 32-bit Steam titles and Proton's 32-bit
|
||||
# prefixes: hardware.graphics.enable32Bit pulls in the matching lib32 NVIDIA
|
||||
# userspace. programs.steam (./gaming.nix) sets it too; stated here as well so
|
||||
# the GPU's 32-bit story lives with the rest of the GPU config.
|
||||
hardware.graphics.enable32Bit = true;
|
||||
}
|
||||
Reference in New Issue
Block a user