NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.29k stars 13.54k forks source link

Documentation: nvidia prime busid option missing info #315450

Open johanno opened 3 months ago

johanno commented 3 months ago

Problem

https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/hardware/video/nvidia.nix when using search.nixos.org in order to find options for hardware.nvidia nvidiaBusId you will not be informed that it is in Base 10.

lspci will always print hex adresses. This is confusing

Proposal

Add quick mention that the ID must be in dec and not in hex.

Checklist


Add a :+1: reaction to issues you find important.

johanno commented 3 months ago

Ok the regex in the desc. Is technically sufficient information, but I don't think you can expect people to understand a regex.

eclairevoyant commented 3 months ago

FYI it can also take a domain value, as per xorg.conf(5).

BTW, I've written a tool to help display the correct ID(s), that people may find useful. It has handling for such PCI domains.

nix --experimental-features "flakes nix-command" run github:eclairevoyant/pcids

If people do find it useful, I could PR it to nixpkgs, so that it could be referenced in the options' descriptions.