From cda3f3f17ea99d118ff8a4f9addd46bc734b8a56 Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 24 Sep 2026 15:27:06 +0200 Subject: [PATCH] perf(deploy): force the unused audio stack off The block enabling pipewire was commented "for transaction sounds", but no such sounds exist: nothing under apps/machine or packages/ constructs an Audio element or ships an audio file. It has been dead weight for as long as it has been there. Removing our own `enable = true` is not enough. services.xserver pulls in NixOS's graphical-desktop module, which mkDefault-enables pipewire exactly as it does speechd, so the stack survived the first attempt at this. That is why the line sits beside the speechd mkForce rather than where the old block was. Most of PipeWire's dependency chain is shared with the GStreamer that Electron drags in, and that stays in the closure either way, so this frees 21MB rather than the whole stack. The remainder comes out with gtk4/gst, which wants a launch test on the sintra first. Co-Authored-By: Claude Fable 5.1 --- deploy/nixos/configuration.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/deploy/nixos/configuration.nix b/deploy/nixos/configuration.nix index 6c11db7..11f6d22 100644 --- a/deploy/nixos/configuration.nix +++ b/deploy/nixos/configuration.nix @@ -13,7 +13,18 @@ # - speechd: text-to-speech (speech-dispatcher → espeak-ng → mbrola, ~1GB). # An ATM does not talk. # - documentation: man/info/NixOS manual — no one reads them on a kiosk. + # - pipewire: the audio stack (+ WirePlumber, ALSA, the PulseAudio shim), + # ~353MB. The app has never played a sound — nothing under apps/machine or + # packages/ constructs an Audio element or ships an audio file. + # + # All three need mkForce, not just an absent/false assignment: enabling + # services.xserver pulls in NixOS's `graphical-desktop` module, which + # mkDefault-enables speechd AND pipewire (services/misc/graphical-desktop.nix). + # Dropping our own `enable = true` simply falls back to that default — the + # 353MB stayed until this was forced off. Re-enable pipewire (with alsa + + # pulse) and security.rtkit if transaction sounds are ever added. services.speechd.enable = lib.mkForce false; + services.pipewire.enable = lib.mkForce false; documentation.enable = false; documentation.nixos.enable = false; @@ -99,14 +110,6 @@ user = "bitspire"; }; - # Audio (for transaction sounds) - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - pulse.enable = true; - }; - # System packages environment.systemPackages = with pkgs; [ # System utilities