Skip to content

Commit

Permalink
feat: disable jack and configure pipewire for low-latency audio
Browse files Browse the repository at this point in the history
  • Loading branch information
DaRacci committed Oct 13, 2024
1 parent 1ff9742 commit 653e212
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion modules/nixos/shared/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,48 @@ in
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
jack.enable = false;
extraConfig.pipewire."92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 44100;
"default.clock.quantum" = 512;
"default.clock.min-quantum" = 512;
"default.clock.max-quantum" = 512;
};
};
};

services.udev.extraRules = ''
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"
'';

security.pam.loginLimits = [
{
domain = "@audio";
item = "memlock";
type = "-";
value = "unlimited";
}
{
domain = "@audio";
item = "rtprio";
type = "-";
value = "99";
}
{
domain = "@audio";
item = "nofile";
type = "soft";
value = "99999";
}
{
domain = "@audio";
item = "nofile";
type = "hard";
value = "524288";
}
];
})
(mkIf cfg.bluetooth.enable {
hardware.bluetooth.enable = true;
Expand Down

0 comments on commit 653e212

Please sign in to comment.