diff --git a/config/nutty-noon.nix b/config/nutty-noon.nix index 9866dae0..9ed07f5e 100644 --- a/config/nutty-noon.nix +++ b/config/nutty-noon.nix @@ -99,18 +99,23 @@ "ca-derivations" ]; networking.firewall.allowedTCPPorts = [58913]; - services.pipewire.config.pipewire."context.properties"."default.clock.rate" = 384000; - services.pipewire.config.pipewire."context.properties"."default.clock.allowed-rates" = [ - 44100 - 48000 - 88200 - 96000 - 176400 - 192000 - 352800 - 384000 - ]; - services.pipewire.config.pipewire."context.properties"."default.clock.quantum" = 8192; + + environment.etc."pipewire/pipewire.conf.d/hi-res.conf".text = '' + context.properties = { + default.clock.rate = 384000 + default.clock.allowedRates = [ + 44100 + 48000 + 88200 + 96000 + 176400 + 192000 + 352800 + 384000 + ] + default.clock.quantum = 8192 + } + ''; nix.settings.substituters = lib.mkForce [ "https://hydra.int.chir.rs/" "https://cache.nixos.org/" diff --git a/config/services/pipewire.nix b/config/services/pipewire.nix index 8355d06d..d80200a0 100644 --- a/config/services/pipewire.nix +++ b/config/services/pipewire.nix @@ -38,23 +38,20 @@ _: { value = "99999"; } ]; - services.pipewire.config.pipewire-pulse = { - "pusle.rules" = [ + environment.etc."pipewire/pipewire-pulse.conf.d/discord.conf".text = '' + pulse.rules = [ { + # Discord notification sounds fix matches = [ - { - "application.process.binary" = ".Discord-wrapped"; - } - { - "application.process.binary" = "Discord"; - } - ]; + { application.process.binary = "Discord" } + { application.process.binary = ".Discord-wrapped" } + ] actions = { - update-props = { - "pulse.min.quantum" = "8192/48000"; - }; - }; + update-props = { + pulse.min.quantum = 1024/48000 # 21ms + } + } } - ]; - }; + ] + ''; }