nixos-config/configurations/host/materusPC/audio.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

2024-03-05 13:25:01 +01:00
{ pkgs, lib, ... }:
{
sound.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
audio.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
systemWide = false;
jack.enable = true;
};
hardware.pulseaudio.enable = false;
2024-03-11 16:19:31 +01:00
environment.sessionVariables =
let
makePluginPath = format:
2024-03-05 13:25:01 +01:00
(lib.makeSearchPath format [
"$HOME/.nix-profile/lib"
"/run/current-system/sw/lib"
"/etc/profiles/per-user/$USER/lib"
])
+ ":$HOME/.${format}";
2024-03-11 16:19:31 +01:00
in
{
ALSOFT_DRIVERS = "pulse";
2024-03-05 13:25:01 +01:00
2024-03-11 16:19:31 +01:00
DSSI_PATH = makePluginPath "dssi";
LADSPA_PATH = makePluginPath "ladspa";
LV2_PATH = makePluginPath "lv2";
LXVST_PATH = makePluginPath "lxvst";
VST_PATH = makePluginPath "vst";
VST3_PATH = makePluginPath "vst3";
2024-03-05 13:25:01 +01:00
2024-03-11 16:19:31 +01:00
};
2024-03-05 13:25:01 +01:00
services.udev = {
extraRules = ''
2024-03-11 16:19:31 +01:00
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
2024-03-05 13:25:01 +01:00
'';
};
2024-03-11 16:19:31 +01:00
environment.systemPackages = with pkgs; [
2024-03-05 13:25:01 +01:00
openal
pulseaudio
reaper
yabridge
yabridgectl
vital
odin2
surge
fire
2024-03-05 13:36:20 +01:00
decent-sampler
lsp-plugins
2024-03-05 13:25:01 +01:00
];
2024-03-11 16:19:31 +01:00
}