From e9fee0e3cdcdc8598277013582b3e11b7f79643b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 9 May 2026 16:00:42 +0000 Subject: [PATCH 1/2] Add Spotify Openbox autostart Drops the TODO in profiles/apps/spotify.nix by declaring a system-wide /etc/xdg/openbox/autostart that launches Spotify with the session. This covers both the console `user` and the xrdp `rdp` account from a single declarative source, since openbox-session sources the system autostart before any per-user one. Gated on qubix.gui == "openbox" so non-Openbox appliance variants do not get a stray autostart file. Smoke test now asserts the autostart file exists and references spotify; README's "Later Goals" list drops the corresponding bullet. --- README.md | 1 - profiles/apps/spotify.nix | 12 +++++++++--- tests/spotibox-basic.nix | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3d24fa3..07a3498 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,6 @@ JSON to YAML with a tool such as `yj`. ## TODO / Later Goals -- Spotify Openbox autostart. - Spotify network lockdown via nftables, proxy or DNS allowlist. - Stable custom Hyper-V NAT switch. - PipeWire + EasyEffects experiment once xrdp audio is understood. diff --git a/profiles/apps/spotify.nix b/profiles/apps/spotify.nix index 6e91cbe..2f70211 100644 --- a/profiles/apps/spotify.nix +++ b/profiles/apps/spotify.nix @@ -5,7 +5,13 @@ lib.mkIf (config.qubix.app == "spotify") { spotify ]; - # TODO: Add Spotify Openbox autostart after the final login/session model is - # fixed. The likely location is /etc/xdg/openbox/autostart or a user-level - # ~/.config/openbox/autostart file. + # The appliance exists to run one app, so Spotify launches with the Openbox + # session for both the console `user` and the xrdp `rdp` user. openbox-session + # sources /etc/xdg/openbox/autostart before any per-user autostart, which + # keeps the behaviour declarative and identical for both accounts. + environment.etc."xdg/openbox/autostart" = lib.mkIf (config.qubix.gui == "openbox") { + text = '' + ${pkgs.spotify}/bin/spotify & + ''; + }; } diff --git a/tests/spotibox-basic.nix b/tests/spotibox-basic.nix index e1c21d1..00c92e8 100644 --- a/tests/spotibox-basic.nix +++ b/tests/spotibox-basic.nix @@ -21,5 +21,7 @@ pkgs.testers.nixosTest { machine.succeed("command -v pavucontrol") machine.succeed("systemctl is-enabled xrdp") machine.succeed("systemctl is-enabled avahi-daemon") + machine.succeed("test -f /etc/xdg/openbox/autostart") + machine.succeed("grep -q spotify /etc/xdg/openbox/autostart") ''; } From 6b360183224b4c14586b121135baed813d6611b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 9 May 2026 16:48:08 +0000 Subject: [PATCH 2/2] Add qubix-closure-info inspection package Adds a small flake package that prints the spotibox system closure size and the top 30 paths sorted by recursive closure size. Intended as the measurement step before deciding what to strip to bring the VHDX down from the empirically-needed 30 GB build floor (issue #1). Run with `nix run .#qubix-closure-info`. Building it forces the spotibox toplevel because the report has to point at a realised store path. --- flake.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/flake.nix b/flake.nix index 926875b..a5629be 100644 --- a/flake.nix +++ b/flake.nix @@ -89,6 +89,29 @@ qubix-manifest-json = pkgs.writeText "qubix-manifest.json" (builtins.toJSON qubixManifest); + # Inspection helper: prints the spotibox system closure size and the top + # 30 contributors, sorted by recursive closure size descending. Intended + # for sizing decisions — building it forces the spotibox toplevel, since + # there is nothing to measure otherwise. + qubix-closure-info = pkgs.writeShellApplication { + name = "qubix-closure-info"; + runtimeInputs = with pkgs; [ nix coreutils ]; + text = '' + toplevel="${spotiboxCfg.system.build.toplevel}" + + echo "Spotibox system toplevel:" + echo " $toplevel" + echo + + echo "Total closure size:" + nix path-info -Sh "$toplevel" + echo + + echo "Top 30 closure contributors (closure size, descending):" + nix path-info -rSh "$toplevel" | sort -hrk2 | head -n 30 + ''; + }; + default = self.packages.${system}.spotibox-vhdx; };