This is one of the original combinators I wrote for myself before even open sourcing jail.nix. It was exposing all of `/sys` which is unnecessary. With this change, only `/sys/dev/char` is shared, (which should only contain symlinks), and any PCI devices that contain a `drm` directory. This seems to be the most reliable way I can tell of finding GPUs from testing various combinations of distros and GPUs. The other signal seems to be if `class` is `0x030000`, although I struggled to find documentation where these classes are defined, and if they are in-fact constant across all linux systems. Anyway, this is a massive improvement over binding all of `/sys`, and hopefully not a breaking change for anyone. If anyone runs into issues, or has suggestions on better approaches I would love to hear it. |
||
|---|---|---|
| .. | ||
| combinators | ||
| base-permissions.nix | ||
| combinators.nix | ||
| default.nix | ||
| helpers.nix | ||
| jail.nix | ||