From 157caffbeba0945103f60b625f8f78a1d7777fc1 Mon Sep 17 00:00:00 2001 From: vin Date: Sun, 21 Sep 2025 14:24:00 -0400 Subject: begrudgingly go back to pipewire fighting against it is hard, especially on nixos and when I want steam --- hosts/demiurge/default.nix | 135 ++++++++------------------------------------- 1 file changed, 23 insertions(+), 112 deletions(-) diff --git a/hosts/demiurge/default.nix b/hosts/demiurge/default.nix index 9f35926..10d2cbe 100644 --- a/hosts/demiurge/default.nix +++ b/hosts/demiurge/default.nix @@ -247,8 +247,10 @@ } ]; }; - sudo.enable = false; + + # needed to give realtime privileges to pipewire + rtkit.enable = true; }; services = { @@ -478,122 +480,31 @@ alsa.enable = true; audio.enable = true; pulse.enable = true; - - extraConfig.pipewire = { - "99-filter-he5xx.conf" = { - "context.modules" = [ - { - name = "libpipewire-module-filter-chain"; - args = { - node.name = "peq-he5xx-sink"; - node.description = "PEQ HE5XX (auto)"; - # playback.props is the virtual sink/device properties - playback.props = { - media.class = "Audio/Sink"; - "filter.smart" = true; - "filter.smart.name" = "peq-he5xx"; - # tell WirePlumber what target properties this filter is intended for - # (we leave this unset here; smart target matching will be done by wireplumber) - }; - # filter graph: single builtin param_eq node that loads the param file - filter.graph = [ - { - type = "builtin"; - name = "param_eq"; - label = "param_eq_he5xx"; - config.filename = "/etc/pipewire/parametric/he5xx.txt"; - } - ]; - }; - } - ]; - }; - - "99-filter-airpods.conf" = { - "context.modules" = [ - { - name = "libpipewire-module-filter-chain"; - args = { - node.name = "peq-airpods-pro-2-sink"; - node.description = "PEQ AirPods Pro 2 (auto)"; - playback.props = { - media.class = "Audio/Sink"; - "filter.smart" = true; - "filter.smart.name" = "peq-airpods-pro-2"; - }; - filter.graph = [ - { - type = "builtin"; - name = "param_eq"; - label = "param_eq_airpods"; - config.filename = "/etc/pipewire/parametric/airpods-pro-2.txt"; - } - ]; - }; - } - ]; - }; - }; - wireplumber = { enable = true; - extraConfig."50-smartfilters-airpods.conf".text = '' - { - "monitor.bluez.rules" : [ - # When a BlueZ device is detected we set an identifying property that the smart filter will match. - # (This fragment adds nothing by default; we're using a policy to match target.node later.) - ], - - "policy.rules" : [ - # The core smart filter matching is done by matching the target.node properties - # WirePlumber's smart filters will look for filter.smart.target (set below). - ], - - "policy" : { - "smart_filters" : { - "rules" : [ - { - "matches" : [ - { "device.props" : { "bluez5.device.name" : "AirPods Pro 2" } } - ], - "actions" : { - # If target device matches, set the 'target.node' metadata for smart filters to use - "update-metadata" : { - "target.node" : { "name" : "bluez_output.*AirPods.*" } - } + extraConfig = { + "51-set-default-eq.conf" = { + text = '' + monitor.rules = [ + { + matches = [ + { + # This rule matches the node with the name of your sink (node 35) + "node.name" = "effect_input.eq6" + } + ] + actions = { + update-props = { + # This sets a very high priority, making it the default. + # Standard hardware is usually around 1000. + "priority.session" = 2001 } - } - ] - } - }, - - "endpoint.rules" : [ - { - "matches" : [ - { "node.name" : "peq-airpods-pro-2-sink" } - ], - "actions" : { - "update-props" : { - # Mark this WF sink as intended for a specific target device. - # WirePlumber will use filter.smart.target to identify which device to chain to. - "filter.smart.target" : { "bluez5.device.name" : "AirPods Pro 2" } - } - } - }, - { - "matches" : [ - { "node.name" : "peq-he5xx-sink" } - ], - "actions" : { - "update-props" : { - # He5xx is a generic filter (no specific bluez target) — it could be matched by other rules. - "filter.smart.target" : {} } } - } - ] - } - ''; + ] + ''; + }; + }; }; }; -- cgit v1.2.3