pipewire: add option for latency fixes

This commit is contained in:
Anthony Rodriguez 2024-09-08 16:27:43 +02:00
parent 0c4e1a5ceb
commit 2eeecb0bee
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
2 changed files with 3 additions and 1 deletions

View file

@ -35,6 +35,7 @@
modules.nvidia.enable = true; modules.nvidia.enable = true;
modules.gaming.enable = true; modules.gaming.enable = true;
modules.pipewire.latencyFix.enable = true;
stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg; stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg;
} }

View file

@ -5,6 +5,7 @@ let
in in
{ {
options.modules.pipewire.enable = lib.mkEnableOption "pipewire module"; options.modules.pipewire.enable = lib.mkEnableOption "pipewire module";
options.modules.pipewire.latencyFix.enable = lib.mkEnableOption "enable latency fixes";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
# rtkit is optional but recommended # rtkit is optional but recommended
@ -18,7 +19,7 @@ in
#jack.enable = true; #jack.enable = true;
}; };
services.pipewire.extraConfig.pipewire."92-low-latency" = { services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable {
"context.properties" = { "context.properties" = {
"default.clock.rate" = 48000; "default.clock.rate" = 48000;
"default.clock.quantum" = 32; "default.clock.quantum" = 32;