hey ther so i got nixos finaly working with steam and sunshine thx to some awasome peaple out there,
waht im now loocking for is a way to have sunshine run Steam big Picture in a “Virtual” Display so that i can workaraund my primary screens aspect ratio of 7:3 since most tv wich i will use for streaming are 16:9, sidenote atm it only start streaming my second monitor not my primary one but that would matter if it would in the future only stream a virtual one wich can be set to 16:9
I found a guide for ArchLinux that might help but it would require porting the description of the steps to something NixOS could handle. How to Create a Virtual Display for Sunshine on Arch Linux - Anton Ždanov
I feel like as long as you could package your edid file, then do whatever is needed on NixOS to add the file to the initrd, and change your kernel parameters, it should be straightforward to get something working.
I hope this helps!
I have been able to make this work by simply using:
boot.kernelParams = [ "video=DP-8:3048x2032R@60D" ];
You still need to check what outputs are free with:
for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
As described here in section 3.1, but EDID is total overkill.
You only need EDID if the port is supposed to work with a physical display. But because we only want a virtual one there’s no point in fussing around with DP or HDMI timing tables.
For the posterity, I needed both the kernelParams to have a display detected, and the EDID to get something other than 1024*768 (see nixos manual for crafting and EDID file).
boot.kernelParams = [ "video=HDMI-A-1:3048x2032R@60D" ];
hardware.display.edid.packages = [
(pkgs.runCommand "edid-custom" { } ''
mkdir -p $out/lib/firmware/edid
base64 -d > "$out/lib/firmware/edid/custom1.bin" <<'EOF'
EDID content
EOF
'')
];
hardware.display.outputs."HDMI-A-1".edid = "custom1.bin";