nix/modules/home-manager/audio.nix

28 lines
722 B
Nix

{ lib, nixosConfig, ... }:
lib.mkIf nixosConfig.bchmnn.audio.enable {
xdg.configFile."wireplumber/wireplumber.conf.d/51-scarlett-samplerate.conf" = {
text = ''
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_input.pci.*"
cpu.vm.name = "~.*"
}
{
node.name = "~alsa_output.pci.*"
cpu.vm.name = "~.*"
}
]
actions = {
update-props = {
api.alsa.period-size = 2048
api.alsa.headroom = 2048
session.suspend-timeout-seconds = 0
}
}
}
]
'';
};
}