2024-01-25 10:52:07 +00:00
|
|
|
# Enable the preferred audio workflow.
|
|
|
|
{ lib, ... }:
|
|
|
|
|
|
|
|
{
|
2024-01-26 08:49:44 +00:00
|
|
|
hardware.pulseaudio.enable = false;
|
2024-01-25 10:52:07 +00:00
|
|
|
security.rtkit.enable = lib.mkDefault true;
|
|
|
|
|
|
|
|
# The main preferred setup of our audio system.
|
|
|
|
services.pipewire = {
|
2024-01-26 08:49:44 +00:00
|
|
|
enable = true;
|
2024-01-25 10:52:07 +00:00
|
|
|
|
|
|
|
# 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.
|
2024-06-10 05:26:14 +00:00
|
|
|
#
|
|
|
|
# Anyways, this enables several audio-related software requiring realtime
|
|
|
|
# scheduling to work such as Sonic Pi.
|
2024-01-25 10:52:07 +00:00
|
|
|
security.pam.loginLimits = [
|
|
|
|
{
|
|
|
|
domain = "@audio";
|
|
|
|
type = "-";
|
|
|
|
item = "rtprio";
|
|
|
|
value = "95";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
domain = "@audio";
|
|
|
|
type = "-";
|
|
|
|
item = "memlock";
|
|
|
|
value = "unlimited";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|