Begin rewrite
This commit is contained in:
parent
fb5d4d46f8
commit
bc6d1e6984
97 changed files with 328 additions and 3101 deletions
47
modules/nixos/hardware/audio/default.nix
Normal file
47
modules/nixos/hardware/audio/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
# Reduce latency
|
||||
# https://wiki.nixos.org/wiki/PipeWire#Low-latency_setup
|
||||
extraConfig = {
|
||||
pipewire."92-low-latency" = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 48000;
|
||||
"default.clock.quantum" = 32;
|
||||
"default.clock.min-quantum" = 32;
|
||||
"default.clock.max-quantum" = 32;
|
||||
};
|
||||
};
|
||||
|
||||
pipewire-pulse."92-low-latency" = {
|
||||
"context.properties" = [
|
||||
{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = { };
|
||||
}
|
||||
];
|
||||
"pulse.properties" = {
|
||||
"pulse.min.req" = "32/48000";
|
||||
"pulse.default.req" = "32/48000";
|
||||
"pulse.max.req" = "32/48000";
|
||||
"pulse.min.quantum" = "32/48000";
|
||||
"pulse.max.quantum" = "32/48000";
|
||||
};
|
||||
"stream.properties" = {
|
||||
"node.latency" = "32/48000";
|
||||
"resample.quality" = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
44
modules/nixos/hardware/nvidia/default.nix
Normal file
44
modules/nixos/hardware/nvidia/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
open = true;
|
||||
modesetting.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
nvidiaSettings = false;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
"nvidia_drm.fbdev=1"
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
environment.sessionVariables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
NVD_BACKEND = "direct";
|
||||
};
|
||||
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue