Skip to content

Conversation

@exzombie
Copy link
Contributor

Description

This PR fixes #8033 where the rationale for why this is needed is given. In short, this module builds a set of GPU drivers and provides a command (to be run with sudo) that installs a Systemd service which sets up /run/opengl-driver symlink on boot. When the home configuration is activated, the symlink is checked and if it is missing or if outdated drivers are found, the user is instructed to run the setup command. I have been using this approach for about two months and it works much better than nixGL.

I have put this under targets.genericLinux, and I have also moved nixGL there for consistency. I think that's the right place; admittedly, I've no idea how things work on darwin, but searching for "darwin" or "macos" in the nixGL repo didn't turn up anything. I have kept the move as a separate commit so that it is easy to undo if needed. But that does mean that half of the commit messages refer to the module under a different name. I can rebase and reword if needed.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

This makes things more consistent overall as both modules are intended
for generic Linux targets while being mutually exclusive.
This should not happen normally, but only when the user explicitly sets
both nixGL packages and force-enables the gpu module. They might have a
valid reason for wanting a nixGL wrapper, so it's not a hard error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Module Request] GPUs on non-NixOS systems: beyond NixGL

1 participant