mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-18 15:01:11 +01:00
deploy: d8efc4bfa7
This commit is contained in:
parent
8d5dfc6ea4
commit
c0026e4efd
2 changed files with 495 additions and 269 deletions
89
index.xhtml
89
index.xhtml
|
|
@ -411,12 +411,68 @@ like</p><pre><code class="programlisting nix">{
|
|||
# …
|
||||
}
|
||||
</code></pre><p>in your Home Manager configuration.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-usage-gpu-non-nixos" class="title" style="clear: both">GPU on non-NixOS systems </h2> </div> </div></div><p>To access the GPU, programs need access to OpenGL and Vulkan libraries. While
|
||||
this works transparently on NixOS, it does not on other Linux systems. A
|
||||
solution is provided by <a class="link" href="https://github.com/nix-community/nixGL" target="_top">NixGL</a>, which
|
||||
can be integrated into Home Manager.</p><p>To enable the integration, import NixGL into your home configuration, either as
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-usage-gpu-non-nixos" class="title" style="clear: both">GPU on non-NixOS systems </h2> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-usage-gpu-sudo">When sudo is available: fixing the host OS</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-gpu-nosudo">No root access: wrapping programs</a> </span></dt> </dl></div><p>To access the GPU, programs need access to OpenGL and Vulkan libraries. While
|
||||
this works transparently on NixOS, it does not on other Linux systems. There are
|
||||
two options:</p><div class="orderedlist"><ol class="orderedlist compact" type="1"><li class="listitem"><p>Recommended: modify the host system slightly so that the graphics libraries
|
||||
can be found where programs from Nixpkgs can find them.</p></li><li class="listitem"><p>Wrap programs from Nixpkgs in an environment which tells them where to find
|
||||
graphics libraries.</p></li></ol></div><p>The first option is very clean because the needed modifications to the host OS
|
||||
are small. However, it does require root/sudo access to the system, which may
|
||||
not be available. The second approach avoids that. However, it injects libraries
|
||||
from Nixpkgs into the environment of wrapped programs, which can make it
|
||||
impossible to launch programs of the host OS from wrapped programs.</p><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-usage-gpu-sudo" class="title" >When sudo is available: fixing the host OS </h3> </div> </div></div><p>The <code class="option">targets.genericLinux.gpu</code> module is automatically enabled whenever
|
||||
the option <code class="option">targets.genericLinux.enable</code> is set (unless
|
||||
<a class="link" href="index.xhtml#sec-usage-gpu-nosudo" title="No root access: wrapping programs" >NixGL</a> is used instead), which is recommended for
|
||||
non-NixOS Linux distributions in any case. The module can also be explicitly
|
||||
enabled by setting <code class="option">targets.genericLinux.gpu.enable</code>.</p><p>This module builds a directory containing GPU libraries. When activating the
|
||||
home configuration by <code class="literal">home-manager switch</code>, the host system is examined: for
|
||||
compatibility with NixOS, these libraries need to be placed in
|
||||
<code class="literal">/run/opengl-driver</code>. If this directory does not exist, or contains a different
|
||||
set of libraries, the activation script will print a warning such as</p><pre><code class="programlisting text">Activating checkExistingGpuDrivers
|
||||
GPU drivers require an update, run
|
||||
sudo /nix/store/HASH-non-nixos-gpu/bin/non-nixos-gpu-setup
|
||||
</code></pre><p>Because the <code class="literal">/run</code> directory is volatile and disappears on reboot, libraries
|
||||
cannot be simply copied or linked there. The <code class="literal">non-nixos-gpu-setup</code> script
|
||||
installs a Systemd service which ensures that the drivers are linked to
|
||||
<code class="literal">/run/opengl-driver</code> on boot. Home Manager will always check and warn you when
|
||||
this setup needs to be refreshed.</p><p>If you ever wish to uninstall these drivers, all you need to do is</p><pre><code class="programlisting sh">sudo rm /run/opengl-driver
|
||||
sudo systemctl disable --now non-nixos-gpu.service
|
||||
sudo rm /etc/systemd/system/non-nixos-gpu.service
|
||||
</code></pre><div class="section"> <div class="titlepage"> <div> <div> <h4 id="sec-usage-gpu-offloading" class="title" >GPU offloading </h4> </div> </div></div><p>You can use the <code class="option">targets.genericLinux.nixGL.prime.installScript</code> option.
|
||||
It installs the <code class="literal">prime-offload</code> script which is configured through options under
|
||||
<code class="option">targets.genericLinux.nixGL.prime</code>. This functionality is independent
|
||||
from the rest of NixGL and can be used when
|
||||
<code class="option">targets.genericLinux.nixGL.packages</code> is left <code class="literal">null</code>, which it should be
|
||||
when using drivers from <code class="literal">/run/opengl-driver</code>.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h4 id="sec-usage-gpu-nvidia" class="title" >Nvidia drivers </h4> </div> </div></div><p>If you need to include the proprietary Nvidia drivers, the process is a bit more
|
||||
involved. You need to:</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>Determine the exact version used by the host system. Example: <code class="literal">550.163.01</code></p></li><li class="listitem"><p>Fetch that version of the drivers from Nvidia and calculate their hash.
|
||||
Example:</p><pre><code class="programlisting sh">nix store prefetch-file \
|
||||
https://download.nvidia.com/XFree86/Linux-x86_64/550.163.01/NVIDIA-Linux-x86_64-550.163.01.run
|
||||
</code></pre><p>Attention: the version and architecture are present twice. If you are on an
|
||||
ARM system, replace <code class="literal">x86_64</code> with <code class="literal">aarch64</code>.</p></li><li class="listitem"><p>Put this information into your home configuration. Example:</p><pre><code class="programlisting nix">targets.genericLinux.gpu.nvidia = {
|
||||
enable = true;
|
||||
version = "550.163.01";
|
||||
sha256 = "sha256-74FJ9bNFlUYBRen7+C08ku5Gc1uFYGeqlIh7l1yrmi4=";
|
||||
};
|
||||
</code></pre></li></ol></div><div class="warning"><h3 class="title">Warning</h3><p>The Nvidia driver version <span class="strong"><strong>must</strong></span> match the host system. This means that you
|
||||
must pay attention when upgrading the system and update the home configuration
|
||||
as well.</p></div>
|
||||
</div>
|
||||
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 id="sec-usage-gpu-nosudo" class="title" >No root access: wrapping programs </h3> </div> </div></div><p>The wrapping approach is facilitated by
|
||||
<a class="link" href="https://github.com/nix-community/nixGL" target="_top">NixGL</a>, which can be integrated into
|
||||
Home Manager.</p><div class="warning"><h3 class="title">Warning</h3><p>This approach can cause issues when a wrapped program from Nixpkgs executes a
|
||||
program from the host. For example, Firefox from Nixpkgs must be wrapped by
|
||||
NixGL in order for graphical acceleration to work. If you then download a PDF
|
||||
file and open it in a PDF viewer that is not installed from Nixpkgs but is
|
||||
provided by the host distribution, there may be issues. Because Firefox’s
|
||||
environment injects libraries from NixGL, they are inherited by the PDF viewer,
|
||||
and unless they are the same or compatible version as the libraries on the host,
|
||||
the viewer will not work. This problem manifests more often with Vulkan because
|
||||
it needs a larger set of injected libraries than OpenGL.</p><p>The problem typically manifests with errors similar to</p><pre><code class="programlisting text">/nix/store/HASH-gcc-12.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.31' not found
|
||||
</code></pre></div><p>To enable the integration, import NixGL into your home configuration, either as
|
||||
a channel, or as a flake input passed via <code class="literal">extraSpecialArgs</code>. Then, set the
|
||||
<code class="literal">nixGL.packages</code> option to the package set provided by NixGL.</p><p>Once integration is enabled, it can be used in two ways: as Nix functions for
|
||||
<code class="literal">targets.genericLinux.nixGL.packages</code> option to the package set provided by
|
||||
NixGL.</p><p>Once integration is enabled, it can be used in two ways: as Nix functions for
|
||||
wrapping programs installed via Home Manager, and as shell commands for running
|
||||
programs installed by other means (such as <code class="literal">nix shell</code>). In either case, there
|
||||
are several wrappers available. They can be broadly categorized</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc;"><li class="listitem"><p>by vendor: as Mesa (for Free drivers of all vendors) and Nvidia (for
|
||||
|
|
@ -430,10 +486,11 @@ configured to use any of the wrappers. It is intended to provide a customization
|
|||
point when the same home configuration is used across several machines with
|
||||
different hardware. There is also the <code class="literal">config.lib.nixGL.wrapOffload</code> alias for
|
||||
two-GPU systems.</p><p>Another convenience is that all wrapper functions are always available. However,
|
||||
when <code class="literal">nixGL.packages</code> option is unset, they are no-ops. This allows them to be
|
||||
used even when the home configuration is used on NixOS machines. The exception
|
||||
is the <code class="literal">prime-offload</code> script which ignores <code class="literal">nixGL.packages</code> and is installed
|
||||
into the environment whenever <code class="literal">nixGL.prime.installScript</code> is set. This script,
|
||||
when <code class="literal">targets.genericLinux.nixGL.packages</code> option is unset, they are no-ops.
|
||||
This allows them to be used even when the home configuration is used on NixOS
|
||||
machines. The exception is the <code class="literal">prime-offload</code> script which ignores
|
||||
<code class="literal">targets.genericLinux.nixGL.packages</code> and is installed into the environment
|
||||
whenever <code class="literal">targets.genericLinux.nixGL.prime.installScript</code> is set. This script,
|
||||
which can be used to start a program on a secondary GPU, does not depend on
|
||||
NixGL and is useful on NixOS systems as well.</p><p>Below is an abbreviated example for an Optimus laptop that makes use of both
|
||||
Mesa and Nvidia wrappers, where the latter is used in dGPU offloading mode. It
|
||||
|
|
@ -442,10 +499,12 @@ to run on the Nvidia dGPU, and how to install the wrapper scripts. It also wraps
|
|||
Xonotic to run on the dGPU, but uses the wrapper function directly for
|
||||
demonstration purposes.</p><pre><code class="programlisting nix">{ config, lib, pkgs, nixgl, ... }:
|
||||
{
|
||||
nixGL.packages = nixgl.packages;
|
||||
nixGL.defaultWrapper = "mesa";
|
||||
nixGL.offloadWrapper = "nvidiaPrime";
|
||||
nixGL.installScripts = [ "mesa" "nvidiaPrime" ];
|
||||
targets.genericLinux.nixGL = {
|
||||
packages = nixgl.packages;
|
||||
defaultWrapper = "mesa";
|
||||
offloadWrapper = "nvidiaPrime";
|
||||
installScripts = [ "mesa" "nvidiaPrime" ];
|
||||
};
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
|
@ -460,10 +519,12 @@ demonstration purposes.</p><pre><code class="programlisting nix">{ config, lib,
|
|||
</code></pre><p>The above example assumes a flake-based setup where <code class="literal">nixgl</code> was passed from the
|
||||
flake. When using channels, the example would instead begin with</p><pre><code class="programlisting nix">{ config, lib, pkgs, ... }:
|
||||
{
|
||||
nixGL.packages = import <nixgl> { inherit pkgs; };
|
||||
targets.genericLinux.nixGL.packages = import <nixgl> { inherit pkgs; };
|
||||
# The rest is the same as above
|
||||
...
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 id="sec-updating" class="title" style="clear: both">Updating </h2> </div> </div></div><p>If you have installed Home Manager using the Nix channel method then
|
||||
updating Home Manager is done by first updating the channel. You can
|
||||
then switch to the updated Home Manager environment.</p><pre><code class="programlisting shell">$ nix-channel --update
|
||||
|
|
|
|||
675
options.xhtml
675
options.xhtml
|
|
@ -14365,8 +14365,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -15219,245 +15219,6 @@ open submodule of attribute set of (Nix config atom (null, bool, int, float, str
|
|||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.packages"></a><a class="term" href="options.xhtml#opt-nixGL.packages"><code class="option">nixGL.packages</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The nixGL package set containing GPU library wrappers. This can be used
|
||||
to provide OpenGL and Vulkan access to applications on non-NixOS systems
|
||||
by using <code class="literal">(config.lib.nixGL.wrap <package>)</code> for the default wrapper, or
|
||||
<code class="literal">(config.lib.nixGL.wrappers.<wrapper> <package>)</code> for any available
|
||||
wrapper.</p><p>The wrapper functions are always available. If this option is empty (the
|
||||
default), they are a no-op. This is useful on NixOS where the wrappers
|
||||
are unnecessary.</p><p>Note that using any Nvidia wrapper requires building the configuration
|
||||
with the <code class="literal">--impure</code> option.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or (attribute set)</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">inputs.nixGL.packages</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.defaultWrapper"></a><a class="term" href="options.xhtml#opt-nixGL.defaultWrapper"><code class="option">nixGL.defaultWrapper</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The package wrapper function available for use as <code class="literal">(config.lib.nixGL.wrap <package>)</code>. Intended to start programs on the main GPU.</p><p>Wrapper functions can be found under <code class="literal">config.lib.nixGL.wrappers</code>. They
|
||||
can be used directly, however, setting this option provides a convenient
|
||||
shorthand.</p><p>The following wrappers are available:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>mesa</p></li><li class="listitem"><p>mesaPrime</p></li><li class="listitem"><p>nvidia</p></li><li class="listitem"><p>nvidiaPrime</p></li></ul></div>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">"mesa"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.installScripts"></a><a class="term" href="options.xhtml#opt-nixGL.installScripts"><code class="option">nixGL.installScripts</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>For each wrapper <code class="literal">wrp</code> named in the provided list, a wrapper script
|
||||
named <code class="literal">nixGLWrp</code> is installed into the environment. These scripts are
|
||||
useful for running programs not installed via Home Manager.</p><p>The following wrappers are available:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>mesa</p></li><li class="listitem"><p>mesaPrime</p></li><li class="listitem"><p>nvidia</p></li><li class="listitem"><p>nvidiaPrime</p></li></ul></div>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or (list of (one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”))</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span></p><pre><code class="programlisting">[
|
||||
"mesa"
|
||||
"mesaPrime"
|
||||
]
|
||||
</code></pre>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.offloadWrapper"></a><a class="term" href="options.xhtml#opt-nixGL.offloadWrapper"><code class="option">nixGL.offloadWrapper</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The package wrapper function available for use as
|
||||
<code class="literal">(config.lib.nixGL.wrapOffload <package>)</code>. Intended to start programs
|
||||
on the secondary GPU.</p><p>Wrapper functions can be found under <code class="literal">config.lib.nixGL.wrappers</code>. They
|
||||
can be used directly, however, setting this option provides a convenient
|
||||
shorthand.</p><p>The following wrappers are available:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>mesa</p></li><li class="listitem"><p>mesaPrime</p></li><li class="listitem"><p>nvidia</p></li><li class="listitem"><p>nvidiaPrime</p></li></ul></div>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">"mesaPrime"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.prime.card"></a><a class="term" href="options.xhtml#opt-nixGL.prime.card"><code class="option">nixGL.prime.card</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Selects the non-default graphics card used for PRIME render offloading.
|
||||
The value can be:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>a number, selecting the n-th non-default GPU;</p></li><li class="listitem"><p>a PCI bus id in the form <code class="literal">pci-XXX_YY_ZZ_U</code>;</p></li><li class="listitem"><p>a PCI id in the form <code class="literal">vendor_id:device_id</code></p></li></ul></div><p>For more information, consult the Mesa documentation on the <code class="literal">DRI_PRIME</code>
|
||||
environment variable.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
string</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">"1"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"pci-0000_06_00_0"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.prime.installScript"></a><a class="term" href="options.xhtml#opt-nixGL.prime.installScript"><code class="option">nixGL.prime.installScript</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>If this option is set, the wrapper script <code class="literal">prime-offload</code> is installed
|
||||
into the environment. It allows starting programs on the secondary GPU
|
||||
selected by the <code class="literal">nixGL.prime.card</code> option. This makes sense when the
|
||||
program is not already using one of nixGL PRIME wrappers, or for
|
||||
programs not installed from Nixpkgs.</p><p>This option can be set to either “mesa” or “nvidia”, making the script
|
||||
use one or the other graphics library.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or one of “mesa”, “nvidia”</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"mesa"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.prime.nvidiaProvider"></a><a class="term" href="options.xhtml#opt-nixGL.prime.nvidiaProvider"><code class="option">nixGL.prime.nvidiaProvider</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>If this option is set, it overrides the offload provider for Nvidia
|
||||
PRIME offloading. Consult the proprietary Nvidia driver documentation
|
||||
on the <code class="literal">__NV_PRIME_RENDER_OFFLOAD_PROVIDER</code> environment variable.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"NVIDIA-G0"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixGL.vulkan.enable"></a><a class="term" href="options.xhtml#opt-nixGL.vulkan.enable"><code class="option">nixGL.vulkan.enable</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable Vulkan in nixGL wrappers.</p><p>This is disabled by default bacause Vulkan brings in several libraries
|
||||
that can cause symbol version conflicts in wrapped programs. Your
|
||||
mileage may vary.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/nixgl.nix" target="_top">
|
||||
<home-manager/modules/misc/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-nixpkgs.config"></a><a class="term" href="options.xhtml#opt-nixpkgs.config"><code class="option">nixpkgs.config</code>
|
||||
|
|
@ -30795,8 +30556,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -31626,8 +31387,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -33247,8 +33008,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -34078,8 +33839,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -50145,8 +49906,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -50976,8 +50737,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -77840,8 +77601,8 @@ list of (maintainer)</p>
|
|||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/02w304s0zwflglw4pw1hjzw8fxmm1s8w-source/modules/generic/meta-maintainers.nix
|
||||
<code class="filename"><a class="filename" href="file:///nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix" target="_top">
|
||||
/nix/store/3fis83br4c3xkqh3457ji3w37gihzk6s-source/modules/generic/meta-maintainers.nix
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
|
@ -120373,6 +120134,410 @@ boolean</p>
|
|||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.gpu.enable"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.gpu.enable"><code class="option">targets.genericLinux.gpu.enable</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable GPU driver integration for non-NixOS systems.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">config.targets.genericLinux.enable && config.targets.genericLinux.nixGL.packages == null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/gpu" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/gpu>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.gpu.packages"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.gpu.packages"><code class="option">targets.genericLinux.gpu.packages</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The Nixpkgs package set where drivers are taken from.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">pkgs</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/gpu" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/gpu>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.gpu.nixStateDirectory"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.gpu.nixStateDirectory"><code class="option">targets.genericLinux.gpu.nixStateDirectory</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The path to the Nix state directory. This only needs to be changed
|
||||
from default if the path was overridden, e.g., by setting the
|
||||
<code class="literal">NIX_STATE_DIR</code> environment variable.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
absolute path</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">"/nix/var/nix"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"/var/lib/nix"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/gpu" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/gpu>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.gpu.nvidia.enable"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.gpu.nvidia.enable"><code class="option">targets.genericLinux.gpu.nvidia.enable</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable proprietary Nvidia drivers.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/gpu" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/gpu>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.gpu.nvidia.sha256"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.gpu.nvidia.sha256"><code class="option">targets.genericLinux.gpu.nvidia.sha256</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The hash of the downloaded driver file. It can be obtained by
|
||||
running, for example,</p><pre><code class="programlisting sh">nix store prefetch-file https://download.nvidia.com/XFree86/Linux-x86_64/@VERSION@/NVIDIA-Linux-x86_64-@VERSION@.run
|
||||
</code></pre><p>where <code class="literal">@VERSION@</code> is replaced with the exact driver version.
|
||||
If you are on ARM, replace Linux-x86_64 with Linux-aarch64.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string matching the pattern sha256-.*=</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">sha256-hfK1D5EiYcGRegss9+H5dDr/0Aj9wPIJ9NVWP3dNUC0=</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/gpu" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/gpu>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.gpu.nvidia.version"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.gpu.nvidia.version"><code class="option">targets.genericLinux.gpu.nvidia.version</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The exact version of Nvidia drivers to use. This version <span class="strong"><strong>must</strong></span>
|
||||
match the version of the driver used by the host OS.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string matching the pattern [0-9]{3}\.[0-9]{2,3}\.[0-9]{2}</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">550.163.01</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/gpu" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/gpu>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.packages"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.packages"><code class="option">targets.genericLinux.nixGL.packages</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The nixGL package set containing GPU library wrappers. This can be used
|
||||
to provide OpenGL and Vulkan access to applications on non-NixOS systems
|
||||
by using <code class="literal">(config.lib.nixGL.wrap <package>)</code> for the default wrapper, or
|
||||
<code class="literal">(config.lib.nixGL.wrappers.<wrapper> <package>)</code> for any available
|
||||
wrapper.</p><p>The wrapper functions are always available. If this option is empty (the
|
||||
default), they are a no-op. This is useful on NixOS where the wrappers
|
||||
are unnecessary.</p><p>Note that using any Nvidia wrapper requires building the configuration
|
||||
with the <code class="literal">--impure</code> option.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or (attribute set)</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">inputs.nixGL.packages</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.defaultWrapper"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.defaultWrapper"><code class="option">targets.genericLinux.nixGL.defaultWrapper</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The package wrapper function available for use as <code class="literal">(config.lib.nixGL.wrap <package>)</code>. Intended to start programs on the main GPU.</p><p>Wrapper functions can be found under <code class="literal">config.lib.nixGL.wrappers</code>. They
|
||||
can be used directly, however, setting this option provides a convenient
|
||||
shorthand.</p><p>The following wrappers are available:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>mesa</p></li><li class="listitem"><p>mesaPrime</p></li><li class="listitem"><p>nvidia</p></li><li class="listitem"><p>nvidiaPrime</p></li></ul></div>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">"mesa"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.installScripts"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.installScripts"><code class="option">targets.genericLinux.nixGL.installScripts</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>For each wrapper <code class="literal">wrp</code> named in the provided list, a wrapper script
|
||||
named <code class="literal">nixGLWrp</code> is installed into the environment. These scripts are
|
||||
useful for running programs not installed via Home Manager.</p><p>The following wrappers are available:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>mesa</p></li><li class="listitem"><p>mesaPrime</p></li><li class="listitem"><p>nvidia</p></li><li class="listitem"><p>nvidiaPrime</p></li></ul></div>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or (list of (one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”))</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span></p><pre><code class="programlisting">[
|
||||
"mesa"
|
||||
"mesaPrime"
|
||||
]
|
||||
</code></pre>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.offloadWrapper"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.offloadWrapper"><code class="option">targets.genericLinux.nixGL.offloadWrapper</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>The package wrapper function available for use as
|
||||
<code class="literal">(config.lib.nixGL.wrapOffload <package>)</code>. Intended to start programs
|
||||
on the secondary GPU.</p><p>Wrapper functions can be found under <code class="literal">config.lib.nixGL.wrappers</code>. They
|
||||
can be used directly, however, setting this option provides a convenient
|
||||
shorthand.</p><p>The following wrappers are available:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>mesa</p></li><li class="listitem"><p>mesaPrime</p></li><li class="listitem"><p>nvidia</p></li><li class="listitem"><p>nvidiaPrime</p></li></ul></div>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">"mesaPrime"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.prime.card"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.prime.card"><code class="option">targets.genericLinux.nixGL.prime.card</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Selects the non-default graphics card used for PRIME render offloading.
|
||||
The value can be:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>a number, selecting the n-th non-default GPU;</p></li><li class="listitem"><p>a PCI bus id in the form <code class="literal">pci-XXX_YY_ZZ_U</code>;</p></li><li class="listitem"><p>a PCI id in the form <code class="literal">vendor_id:device_id</code></p></li></ul></div><p>For more information, consult the Mesa documentation on the <code class="literal">DRI_PRIME</code>
|
||||
environment variable.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
string</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">"1"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"pci-0000_06_00_0"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.prime.installScript"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.prime.installScript"><code class="option">targets.genericLinux.nixGL.prime.installScript</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>If this option is set, the wrapper script <code class="literal">prime-offload</code> is installed
|
||||
into the environment. It allows starting programs on the secondary GPU
|
||||
selected by the <code class="literal">nixGL.prime.card</code> option. This makes sense when the
|
||||
program is not already using one of nixGL PRIME wrappers, or for
|
||||
programs not installed from Nixpkgs.</p><p>This option can be set to either “mesa” or “nvidia”, making the script
|
||||
use one or the other graphics library.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or one of “mesa”, “nvidia”</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"mesa"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.prime.nvidiaProvider"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.prime.nvidiaProvider"><code class="option">targets.genericLinux.nixGL.prime.nvidiaProvider</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>If this option is set, it overrides the offload provider for Nvidia
|
||||
PRIME offloading. Consult the proprietary Nvidia driver documentation
|
||||
on the <code class="literal">__NV_PRIME_RENDER_OFFLOAD_PROVIDER</code> environment variable.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"NVIDIA-G0"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-targets.genericLinux.nixGL.vulkan.enable"></a><a class="term" href="options.xhtml#opt-targets.genericLinux.nixGL.vulkan.enable"><code class="option">targets.genericLinux.nixGL.vulkan.enable</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable Vulkan in nixGL wrappers.</p><p>This is disabled by default bacause Vulkan brings in several libraries
|
||||
that can cause symbol version conflicts in wrapped programs. Your
|
||||
mileage may vary.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/targets/generic-linux/nixgl.nix" target="_top">
|
||||
<home-manager/modules/targets/generic-linux/nixgl.nix>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="opt-uninstall"></a><a class="term" href="options.xhtml#opt-uninstall"><code class="option">uninstall</code>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue