nixos-config/modules/nixos/profiles/desktop/audio.nix
Gabriel Arazas c2513f94ea
nixos/profiles/desktop: make Pipewire the preferred audio setup
We can still modularize those imports even if we have problems with it.
2024-01-26 16:49:44 +08:00

39 lines
839 B
Nix

# Enable the preferred audio workflow.
{ lib, ... }:
{
hardware.pulseaudio.enable = false;
security.rtkit.enable = lib.mkDefault true;
# The main preferred setup of our audio system.
services.pipewire = {
enable = true;
# This is enabled by default but I want to explicit since
# this is my preferred way of managing anyways.
wireplumber.enable = true;
# Enable all the bi-...bridges.
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# This is based from https://jackaudio.org/faq/linux_rt_config.html.
security.pam.loginLimits = [
{
domain = "@audio";
type = "-";
item = "rtprio";
value = "95";
}
{
domain = "@audio";
type = "-";
item = "memlock";
value = "unlimited";
}
];
}