From 82d7029260bacf346228b5a7c3daf36099b9f86b Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 7 Jan 2025 13:51:55 +0100 Subject: [PATCH] nixos/services/pipewire: switch to nix-gaming low latency --- config/nixos/services/pipewire.nix | 34 +++++++++++++----------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/config/nixos/services/pipewire.nix b/config/nixos/services/pipewire.nix index fa42d5a..c8055ca 100644 --- a/config/nixos/services/pipewire.nix +++ b/config/nixos/services/pipewire.nix @@ -1,22 +1,18 @@ -{ - hardware.pulseaudio.enable = false; - # rtkit is optional but recommended - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - }; - - services.pipewire.extraConfig.pipewire."92-low-latency" = { - "context.properties" = { - "default.clock.rate" = 48000; - "default.clock.allowed-rates" = [48000]; - "default.clock.quantum" = 2048; - "default.clock.min-quantum" = 1024; +{inputs, ...}: { + imports = [ + inputs.nix-gaming.nixosModules.pipewireLowLatency + ]; + services = { + pulseaudio.enable = false; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + lowLatency.enable = true; }; }; + # rtkit is optional but recommended + security.rtkit.enable = true; }