From e516ab449a3874660db264037bd7cc9edd37e840 Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 24 Sep 2026 15:27:17 +0200 Subject: [PATCH] perf(deploy): trim systemPackages to kiosk essentials Every entry here ships to each ATM and eats the eMMC headroom the nightly nixos-rebuild needs, which is tight enough already that GC runs at 03:30 purely to clear room for the 04:00 upgrade. Out: git, at 70MB, since nixos-rebuild fetches the flake with its own git-minimal that unit-nixos-upgrade.service keeps in the closure, so auto-upgrade is unaffected. nodejs_22, at 94MB, which nothing runs: the app is Electron and embeds its own node, and fund-atm references pkgs-unstable.nodejs by store path. wget, which curl covers. And vim, replaced by nano. Keeping an editor at all is deliberate. Field edits to /var/lib/bitspire/.env happen over ssh, and nano costs a few MB where vim costs 43. minicom and screen stay for the same reason: the validator and dispenser sit on ttyJ5 and ttyJ7, those two are how a serial fault gets diagnosed, and they cost about 2MB between them. With the two preceding commits the sintra-installed closure goes from 5144MB to 4604MB across 131 fewer store paths. Co-Authored-By: Claude Fable 5.1 --- deploy/nixos/configuration.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/deploy/nixos/configuration.nix b/deploy/nixos/configuration.nix index 11f6d22..8f7928e 100644 --- a/deploy/nixos/configuration.nix +++ b/deploy/nixos/configuration.nix @@ -111,29 +111,37 @@ }; # System packages + # + # Kept deliberately thin — this is a kiosk, and every entry here is closure + # that ships to each ATM and eats eMMC headroom the nightly rebuild needs. + # Deliberately absent (see #70 sizing): + # git 70MB. nixos-rebuild fetches the flake with its OWN git-minimal, + # which stays in the closure via unit-nixos-upgrade.service, so + # auto-upgrade is unaffected. + # vim 43MB. Replaced by nano — an on-box editor is worth a few MB for + # field edits to /var/lib/bitspire/.env, vim's bulk is not. + # nodejs_22 94MB. Nothing runs it: the app is Electron (which embeds its + # own node) and fund-atm already pins pkgs-unstable.nodejs itself. + # wget curl covers it. environment.systemPackages = with pkgs; [ # System utilities htop - vim - git + nano curl - wget # Hardware debugging usbutils pciutils lsof - # Serial port tools + # Serial port tools (validator/dispenser live on ttyJ5/ttyJ7 — these are + # how a field fault gets diagnosed, and they cost ~2MB between them) minicom screen # For the Electron app pkgs-unstable.electron - # Node.js for the application - pkgs-unstable.nodejs_22 - # Camera support. v4l-utils' default build drags in the whole Qt6 stack # for its qv4l2 GUI (~0.5GB) — we only ever use the v4l2-ctl CLI, so drop # the GUI.