audio-server: allow loading rtkit on headless systems

This commit is contained in:
Sandro - 2023-05-16 23:18:07 +02:00
parent a8a5870a02
commit c51146e013
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 12 additions and 1 deletions

View File

@ -73,7 +73,18 @@
})
];
security.rtkit.enable = true;
security = {
polkit.extraConfig = /* javascript */ ''
# https://www.reddit.com/r/voidlinux/comments/o74i76/comment/h2z9u11/?utm_source=reddit&utm_medium=web2x&context=3
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.RealtimeKit1.acquire-high-priority"
|| action.id == "org.freedesktop.RealtimeKit1.acquire-real-time") {
return polkit.Result.YES;
}
});
'';
rtkit.enable = true;
};
services.pipewire = {
enable = true;