Files
nix-config/modules/nixos/desktop/networking/sunshine/README.md
T
ryan4yin | 二花 9db935bc87 fix(sunshine): use Intel rendering and recover remote Niri sessions (#268)
- render Niri on the Intel iGPU while retaining NVIDIA-connected physical outputs
- encode Sunshine streams with Intel VAAPI and wait for a Niri output before startup
- load VKMS persistently for headless sessions and configure `Virtual-1` at 2560x1600@60
- let Moonlight request the stream bitrate instead of enforcing a 20 Mbps host cap
- remove unsupported Dynamic Boost and global NVIDIA session overrides
- grant Sunshine access to virtual input devices
- add a Nushell recovery helper that starts a temporary greetd/Niri session from SSH
- identify and safely replace normal, standalone, or previous transient Niri sessions
- launch the transient service in the background and verify greetd, Niri, and Sunshine before returning
- ignore local `.worktrees` directories and keep eval regression coverage focused on structural behavior
2026-09-01 03:40:48 -06:00

35 lines
1.4 KiB
Markdown

# Temporary remote session recovery
When a remote-only machine is stuck at the `greetd` TUI, run the Nushell helper from an
SSH session to start one complete PAM/logind Wayland session without changing
the persistent NixOS configuration:
```bash
sudo nu ./remote-session.nu
```
The helper validates its dependencies before changing the current session. It
then stops the normal `greetd` service, starts a transient systemd-managed
`greetd` configuration on `/dev/tty1`, and runs Niri directly. It returns after
greetd, Niri, and Sunshine are ready. Tailscale is not affected.
The `Virtual-1` output is created persistently by the `vkms` configuration in
`hosts/idols-ai/hardware-intel.nix` and configured by
`hosts/idols-ai/niri-hardware.kdl`. It gives Niri and Sunshine a capture target
when both physical monitors attached to the NVIDIA GPU are off. The output also
exists during normal physical sessions; keeping an idle virtual framebuffer has
minor GPU and memory overhead.
Options:
```text
-u USER session user (defaults to SUDO_USER)
-t TTY tty device, for example /dev/tty2
-c COMMAND Wayland session command (defaults to niri --session)
-f, --force replace an existing Niri session without confirmation
--check validate prerequisites without changing service state
```
A reboot or a manual restart of `greetd.service` restores the normal TUI
configuration.