mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-12-23 02:36:05 +01:00
update docs
This commit is contained in:
parent
f87288bba6
commit
c5b97600fe
35
NixOS.md
35
NixOS.md
@ -206,7 +206,7 @@ nix-locate --whole-name '/bash'
|
||||
|
||||
## List files of package
|
||||
|
||||
* https://discourse.nixos.org/t/list-files-of-package/25830/2?u=langfingaz
|
||||
* https://discourse.nixos.org/t/list-files-of-package/25830/2
|
||||
|
||||
Example for `nano`:
|
||||
|
||||
@ -695,34 +695,7 @@ Video acceleration:
|
||||
Verification in general:
|
||||
- Encode a video or play a game and watch AMD GPU usage with `radeontop`.
|
||||
|
||||
Configuration example for an AMD GPU:
|
||||
|
||||
```nix
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
# Whether to enable accelerated OpenGL rendering through the Direct Rendering Interface (DRI).
|
||||
# The Direct Rendering Infrastructure (DRI) is the framework comprising the modern Linux graphics [...]. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL.
|
||||
driSupport = true;
|
||||
extraPackages = [
|
||||
# AMD Open Source Driver For Vulkan
|
||||
pkgs.amdvlk
|
||||
|
||||
# Encoding/decoding acceleration
|
||||
#
|
||||
# VDPAU driver with OpenGL/VAAPI backend
|
||||
pkgs.libvdpau-va-gl
|
||||
# VDPAU driver for the VAAPI library
|
||||
pkgs.vaapiVdpau
|
||||
|
||||
# OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms.
|
||||
#
|
||||
# OpenCL ICD definition for AMD GPUs using the ROCm stack.
|
||||
pkgs.rocm-opencl-icd
|
||||
# OpenCL runtime for AMD GPUs, part of the ROCm stack.
|
||||
pkgs.rocm-opencl-runtime
|
||||
];
|
||||
};
|
||||
```
|
||||
Configuration example for an AMD GPU (https://github.com/tolgaerok/nixos-kde/blob/main/core/gpu/amd/default.nix): See [./modules/gpu-amd.nix](./modules/gpu-amd.nix)
|
||||
|
||||
## Additional resources
|
||||
|
||||
@ -732,8 +705,8 @@ hardware.opengl = {
|
||||
* Documenting the Journey of Learning and Mastering Nix. https://ianthehenry.com/posts/how-to-learn-nix/
|
||||
* Nix language basics. https://nix.dev/tutorials/nix-language.html
|
||||
* Nix data types. https://nixos.org/manual/nix/stable/language/values
|
||||
* MkIfElse. https://discourse.nixos.org/t/mkif-vs-if-then/28521/4?u=langfingaz
|
||||
* Nix language basics - a one pager. https://github.com/tazjin/nix-1p#nix---a-one-pager
|
||||
* MkIfElse. https://discourse.nixos.org/t/mkif-vs-if-then/28521/4
|
||||
* Nix language basics - a one-pager. https://github.com/tazjin/nix-1p#nix---a-one-pager
|
||||
|
||||
### Nix Pills
|
||||
|
||||
|
@ -89,7 +89,7 @@ A slightly modified config can be found in [./hosts/pi3bplus](./hosts/pi3bplus)
|
||||
|
||||
#### Apply modified configuration
|
||||
|
||||
The Rapberry Pi 3B+ has only 1GB RAM, which is not enough for `nixos-rebuild`. It is recommended to create and activate a SWAP file first: https://wiki.archlinux.org/title/swap#Swap_file_creation
|
||||
The Raspberry Pi 3B+ has only 1GB RAM, which is not enough for `nixos-rebuild`. It is recommended to create and activate a SWAP file first: https://wiki.archlinux.org/title/swap#Swap_file_creation
|
||||
|
||||
```shell
|
||||
nix-channel --list
|
||||
|
36
modules/gpu-amd.nix
Normal file
36
modules/gpu-amd.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# See `NixOS.md` at section "Graphic drivers"
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
|
||||
# Whether to enable accelerated OpenGL rendering through the Direct Rendering Interface (DRI).
|
||||
# The Direct Rendering Infrastructure (DRI) is the framework comprising the modern Linux graphics [...]. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL.
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
|
||||
extraPackages = [
|
||||
# AMD Open Source Driver For Vulkan
|
||||
pkgs.amdvlk
|
||||
|
||||
# Encoding/decoding acceleration
|
||||
#
|
||||
# VDPAU driver with OpenGL/VAAPI backend
|
||||
pkgs.libvdpau-va-gl
|
||||
# VDPAU driver for the VAAPI library
|
||||
pkgs.vaapiVdpau
|
||||
|
||||
# OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms.
|
||||
#
|
||||
# OpenCL ICD definition for AMD GPUs using the ROCm stack.
|
||||
pkgs.rocm-opencl-icd
|
||||
# OpenCL runtime for AMD GPUs, part of the ROCm stack.
|
||||
pkgs.rocm-opencl-runtime
|
||||
|
||||
# Xorg driver for AMD Radeon GPUs using the amdgpu kernel driver
|
||||
# https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu
|
||||
pkgs.xorg.xf86videoamdgpu
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user