guitarix with sound setup

This commit is contained in:
2026-04-23 22:15:10 +02:00
parent 307aa270c0
commit 78e29da9f8
2 changed files with 56 additions and 1 deletions
+55
View File
@@ -0,0 +1,55 @@
{ pkgs, config, ... }:
{
# PipeWire with JACK support
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
# Low-latency: ~5ms at 48kHz
extraConfig.pipewire."92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.quantum" = 128;
"default.clock.min-quantum" = 64;
"default.clock.max-quantum" = 512;
};
};
extraConfig.pipewire-pulse."92-low-latency" = {
"pulse.properties" = {
"pulse.min.req" = "64/48000";
"pulse.default.req" = "64/48000";
"pulse.max.req" = "128/48000";
};
};
};
# Real-time scheduling
security.rtkit.enable = true;
security.pam.loginLimits = [
{ domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; }
{ domain = "@audio"; item = "rtprio"; type = "-"; value = "95"; }
];
users.users.fredrikr.extraGroups = [ "audio" ]; # <-- change yourname
# Zen kernel = better real-time perf
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelParams = [
"threadirqs"
"usbcore.autosuspend=-1" # prevent USB interface from sleeping
];
powerManagement.cpuFreqGovernor = "performance";
environment.systemPackages = with pkgs; [
qpwgraph # visual patchbay - connect guitar in → amp → out
pavucontrol # set Scarlett to "Pro Audio" profile
guitarix # amp sim, use instead of Ableton
lsp-plugins # EQ, compressor, etc.
alsa-scarlett-gui # Scarlett hardware mixer
];
}