1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

nixgl: add support for channel-based configuration

This commit is contained in:
Jure Varlec 2024-10-02 20:19:53 +02:00 committed by Robert Helgesson
parent 7a5879707b
commit 8bd6e0a1a8
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
2 changed files with 34 additions and 4 deletions

View file

@ -50,9 +50,9 @@ Xonotic to run on the dGPU, but uses the wrapper function directly for
demonstration purposes.
```nix
{ config, lib, pkgs, nixGL, ... }:
{ config, lib, pkgs, nixgl, ... }:
{
nixGL.packages = nixGL.packages;
nixGL.packages = nixgl.packages;
nixGL.defaultWrapper = "mesa";
nixGL.offloadWrapper = "nvidiaPrime";
nixGL.installScripts = [ "mesa" "nvidiaPrime" ];
@ -68,3 +68,14 @@ demonstration purposes.
];
}
```
The above example assumes a flake-based setup where `nixgl` was passed from the
flake. When using channels, the example would instead begin with
```nix
{ config, lib, pkgs, ... }:
{
nixGL.packages = import <nixgl> { inherit pkgs; };
# The rest is the same as above
...
```