Files
nix-config/outputs/x86_64-linux/tests/idols-ai-gpu/expr.nix
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

18 lines
737 B
Nix

{
lib,
outputs,
...
}:
let
cfg = outputs.nixosConfigurations.ai-niri.config;
niriHardware = builtins.readFile ../../../../hosts/idols-ai/niri-hardware.kdl;
in
{
loadsVirtualDisplay = builtins.elem "vkms" cfg.boot.kernelModules;
createsVirtualDisplay = lib.hasInfix "options vkms create_default_dev=1" cfg.boot.extraModprobeConfig;
niriUsesIntelRenderer = lib.hasInfix "/dev/dri/by-path/pci-0000:00:02.0-render" niriHardware;
sunshineUserHasInputAccess = builtins.elem "input" cfg.users.users.ryan.extraGroups;
sunshineStartsAfterNiri = builtins.elem "niri.service" cfg.systemd.user.services.sunshine.after;
sunshineWaitsForNiriOutput = lib.hasInfix "niri msg outputs" cfg.systemd.user.services.sunshine.preStart;
}