nixos-config/config/services/pipewire.nix

58 lines
1.2 KiB
Nix
Raw Normal View History

2022-06-12 15:42:42 +00:00
_: {
2022-01-18 19:58:26 +00:00
services.pipewire = {
2022-01-18 19:57:00 +00:00
enable = true;
pulse.enable = true;
jack.enable = true;
alsa.enable = true;
2022-04-09 11:22:14 +00:00
alsa.support32Bit = true;
2022-01-18 19:57:00 +00:00
};
2022-04-09 11:22:14 +00:00
security.rtkit.enable = true;
hardware.pulseaudio.enable = false;
2022-01-18 19:57:00 +00:00
xdg.portal = {
enable = true;
wlr.enable = true;
};
2022-04-09 11:22:14 +00:00
security.pam.loginLimits = [
2022-06-12 15:39:15 +00:00
{
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 = "99999";
}
2022-04-09 11:22:14 +00:00
];
2023-04-02 08:48:30 +00:00
environment.etc."pipewire/pipewire-pulse.conf.d/discord.conf".text = ''
pulse.rules = [
2022-05-17 19:21:09 +00:00
{
2023-04-02 08:48:30 +00:00
# Discord notification sounds fix
2022-06-12 15:39:15 +00:00
matches = [
2023-04-02 08:48:30 +00:00
{ application.process.binary = "Discord" }
{ application.process.binary = ".Discord-wrapped" }
]
2022-05-17 19:21:09 +00:00
actions = {
2023-04-02 08:48:30 +00:00
update-props = {
pulse.min.quantum = 1024/48000 # 21ms
}
}
2022-05-17 19:21:09 +00:00
}
2023-04-02 08:48:30 +00:00
]
'';
2022-01-18 19:57:00 +00:00
}