From 2eeecb0beec71b9bdb3362337a55634dfd502d07 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Sun, 8 Sep 2024 16:27:43 +0200 Subject: [PATCH] pipewire: add option for latency fixes --- hosts/solaire/default.nix | 1 + modules/pipewire.nix | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index 56b6216..565cbf1 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -35,6 +35,7 @@ modules.nvidia.enable = true; modules.gaming.enable = true; + modules.pipewire.latencyFix.enable = true; stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg; } diff --git a/modules/pipewire.nix b/modules/pipewire.nix index 2c191d8..e5cf2e9 100644 --- a/modules/pipewire.nix +++ b/modules/pipewire.nix @@ -5,6 +5,7 @@ let in { options.modules.pipewire.enable = lib.mkEnableOption "pipewire module"; + options.modules.pipewire.latencyFix.enable = lib.mkEnableOption "enable latency fixes"; config = lib.mkIf cfg.enable { hardware.pulseaudio.enable = false; # rtkit is optional but recommended @@ -18,7 +19,7 @@ in #jack.enable = true; }; - services.pipewire.extraConfig.pipewire."92-low-latency" = { + services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable { "context.properties" = { "default.clock.rate" = 48000; "default.clock.quantum" = 32;