Commit Graph

27 Commits

Author SHA1 Message Date
Giancarmine Salucci
56dfe11039 refactor: unified multi-profile build system
Add 4 configurable profiles (stable-cinnamon, stable-niri,
mainline-cinnamon, mainline-niri) with a single unified build
entry point.

- iso/build.sh: replaces build-iso.sh / build-live-iso.sh /
  build-niri-live-iso.sh; accepts --profile and --type flags
- iso/_inner-build-unified.sh: replaces the three _inner-build-*.sh
  scripts; branches on BUILD_TYPE / DESKTOP / KERNEL_PKG env vars
- config/profiles/stable-niri/: new — linux (k6) + niri/Wayland/noctalia
- config/profiles/mainline-cinnamon/: new — linux-mainline (k7) + Cinnamon/X11
- config/profiles/mainline-niri/packages.live.list: symlink added
- config/profiles/stable-cinnamon/packages.live.list: symlink added
- Makefile: PROFILE variable (default stable-cinnamon), shellcheck updated
- installer/install.sh: respects DEFAULT_PROFILE env (set by live ISO)
- tests/run-qemu-test.sh: passes PROFILE through to build and overlay

Live ISOs embed the installer pre-configured for the same profile
they were built with (DEFAULT_PROFILE in /etc/profile.d/).
2026-04-26 12:42:11 +02:00
mozempk
88797bb1e9 Add kernel-7 audio diagnostics and verify SOF/UCM completeness
- Add alsa-ucm-conf to installed packages.list (already in live-desktop.list)
- Create KERNEL7_AUDIO_XPS9700.md with comprehensive audio diagnostics guide
- Document kernel parameter choices and SOF/SoundWire fix approach in build scripts
- Includes boot-time dsp_driver=3 test procedure for XPS 9700 kernel 7 compatibility
2026-04-25 22:35:46 +02:00
mozempk
2dc1881b69 Fix niri live ISO audio and dark theme setup 2026-04-25 22:22:07 +02:00
mozempk
21de42b6b1 feat(niri-live): dual-kernel boot menu, audio fix, elogind fix, rsync optimization
- Add kernel 7 (linux-mainline) as primary boot entry
- Add kernel 6 (linux) as secondary fallback boot entry
- Simplified boot menu: single entry per kernel, no failsafe variants
- Add snd-intel-dspcfg.dsp_driver=1 + snd_hda_intel.dmic_detect=0 to BOOT_CMDLINE
- Fix elogind sv: dual D-Bus + PID check to suppress already-running warnings
- Replace cp -rfpPv with rsync -aHX in copy_include_directories (nixpkgs speed fix)
- Fix trailing slash bash glob bug in mklive.sh and postsetup-nvidia.sh
- Add -v linux-mainline to _inner-build-niri-live.sh for correct primary kernel
2026-04-25 21:38:07 +02:00
mozempk
6bb29fc081 fix(mainline-niri): add linux-mainline-headers to enable nvidia DKMS on kernel 7.0 2026-04-25 20:15:43 +02:00
mozempk
cd8248f2f5 feat: NVIDIA PRIME, audio fix, timezone, dmesg error cleanup
- Add nvidia/nvidia-dkms/nvidia-libs-32bit/nvidia-vaapi-driver to niri
  live and installed profiles; wireless-regdb and sof-firmware to all
  profiles (fixes regulatory.db and SOF firmware dmesg errors)

- iso/postsetup-nvidia.sh: new mklive -x hook that re-runs dracut inside
  the rootfs chroot after the overlay is applied; ensures the squashfs
  initramfs includes nvidia.ko and omits nouveau.ko at build time —
  no driver install needed at runtime (fixes /run tmpfs overflow that was
  killing wireplumber by corrupting D-Bus sockets)

- Both ISO inner build scripts gain -x postsetup-nvidia.sh and the nonfree
  repo flag so nvidia packages resolve correctly

- niri config: wireplumber started via supervisor loop (waits for PipeWire
  socket, auto-restarts on crash) replacing the one-shot exec — survives
  any D-Bus or pipewire disruption

- build-niri-live-iso.sh: NVIDIA modprobe blacklist-nouveau.conf,
  btusb-quirks.conf, modules-load.d/nvidia.conf, dracut/10-nvidia.conf,
  Xorg intel/nvidia configs, prime-run helper, elogind run script loop
  guard, timezone Europe/Zurich overlay, updated BOOT_CMDLINE

- build-live-iso.sh: same NVIDIA + timezone + sound udev rule overlays;
  live-setup.sh timezone and audio group fix

- installer/lib/grub.sh: GRUB_CMDLINE_LINUX_DEFAULT gains
  nvidia-drm.modeset=1 rd.driver.blacklist=nouveau btusb.enable_autosuspend=0

- installer/lib/postinstall.sh: configure_nvidia_prime() adds
  blacklist-nouveau.conf, btusb-quirks.conf, dracut omit_drivers nouveau,
  modules-load.d with all four nvidia modules
2026-04-25 18:27:06 +02:00
moze
40f4efceed Add GUI git-askpass so credential prompts work without a TTY
Installs /usr/local/bin/git-askpass (uses zenity or qarma) and sets
core.askPass in /etc/gitconfig. Git now pops a GUI dialog for username/
password instead of trying to open /dev/tty, which fails in headless
contexts (scripts, Claude Code terminal).

Adds zenity to live desktop package lists for both niri and cinnamon profiles.
Propagated to: both live ISO builders and the installer postinstall.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:04:54 +00:00
moze
106fa940d7 Configure git credential.helper=store system-wide
Prevents git from trying to open /dev/tty for password prompts in
environments without a controlling terminal (live ISO, scripts, Claude Code).
Credentials stored once in ~/.git-credentials and reused automatically.

Applied to: both live ISO include overlays and the installer target system.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:01:15 +00:00
moze
49d94bd2ac Fix nix single-user mode for live ISO and installer
- Store ownership: chown -R 1000:1000 at Docker build time (not runtime)
  so the live user can create lock files without flooding the tmpfs overlay
- nix.conf: add build-users-group= to force single-user mode and avoid
  daemon connection attempts (xbps nix-daemon v2.30.2 incompatible with
  pre-baked nix v2.34.6)
- profile.d: export NIX_REMOTE=local and NIXPKGS_ALLOW_UNFREE=1; wrap nix()
  to append --impure so flake installs work without extra flags
- Skel: add ~/.config/nixpkgs/config.nix with allowUnfree=true
- postinstall.sh: fix daemon socket path (/nix/var/nix/...), write
  ~/.config/nixpkgs/config.nix for installed user
- first-login.sh: add NIX_REMOTE=local alongside NIXPKGS_ALLOW_UNFREE=1
- Remove nix-daemon from live ISO services (wrong version for pre-baked client)
- Misc: bluetooth group, package list reorg, skip vscode install for niri profile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 12:56:13 +00:00
mozempk
6d65f28844 feat(niri): niri live config 2026-04-25 13:23:49 +02:00
mozempk
a63446a832 fix: add --extra-experimental-features nix-command flakes to nix profile add 2026-04-23 14:57:40 +02:00
mozempk
2b866d2c8f fix: explicitly add nix bin to PATH after sourcing nix.sh in Docker 2026-04-23 14:57:03 +02:00
mozempk
190a7d64f4 fix: set NIX_CONFIG build-users-group empty to skip nixbld group check in Docker 2026-04-23 14:56:04 +02:00
mozempk
dcde299b45 fix: pre-create /nix before nix installer in Docker (no sudo available) 2026-04-23 14:54:29 +02:00
mozempk
b2c2311dd2 fix: use nixpkgs#google-chrome instead of chromium (chrome is nix-baked) 2026-04-23 14:51:51 +02:00
mozempk
1ed3189a93 feat: bake everything into live ISO — no first-login script
Instead of downloading at first login, everything is ready at boot:

- iso/build-live-iso.sh:
  * apply-live-settings.sh XDG autostart applies theme/wallpaper/terminal
    via gsettings at first Cinnamon login (reliable vs dconf binary format)
  * /etc/environment: XDG_DATA_DIRS includes nix profile so Cinnamon menu
    shows pre-baked nix apps immediately
  * /etc/profile.d/nix-prebaked.sh: PATH setup for terminal sessions
  * first-login.sh kept at /usr/local/libexec but NOT autostarted (manual
    use for Claude/NVM installs)
  * NIX_PACKAGES_PREBAKE passed to Docker build

- iso/_inner-build-live.sh:
  * Pre-bake nix packages inside Docker before mklive.sh; copy /nix store
    into squashfs overlay; set /etc/skel/.nix-profile → store profile path
  * Cached at /cache/nix-prebake (keyed by package list md5)

- iso/Dockerfile: add rsync (needed by nix prebake)

- packages.live-desktop.list: add vscode + chromium (XBPS, no download)
2026-04-23 14:49:01 +02:00
mozempk
f7f1a99e89 feat: add live-qemu target with 12GB RAM for nix package headroom
Live session is a pure-RAM tmpfs overlay. Cinnamon takes ~2.5GB, nix
packages take ~4GB — 6GB QEMU was too tight. 12GB gives comfortable
headroom. Real XPS 9700 (32GB) already works fine.

- tests/launch-live-qemu.sh: dedicated QEMU launcher, RAM_MB=12288
- Makefile: 'make live-qemu' target
2026-04-23 14:16:59 +02:00
mozempk
34384a3df3 fix: installer packages.list path (config/profiles/stable-cinnamon/packages.list) 2026-04-23 09:34:23 +02:00
mozempk
30ae82c5fd feat: add installer to live ISO; skip nix pkgs if <4GB free in /nix
- iso/build-live-iso.sh: copy install.sh+lib/ to /usr/local/lib/void-installer/,
  config+profiles to /usr/local/share/installer/, bake secrets.env as
  /etc/installer-secrets.env, add 'Install Void Linux' .desktop launcher
  (opens alacritty+sudo), create /usr/local/bin/void-install wrapper
- installer/first-login.sh: skip nix profile add when /nix has <4GB free
  (live tmpfs overlay fills up with ~3-4GB of nix packages); packages are
  installed on first login after the system is installed instead
2026-04-23 09:32:39 +02:00
mozempk
0f49e9aafa fix: nix max-jobs=2, sha256sum exit, build FAILED false positive
- nix.conf: max-jobs=2 http-connections=10 to limit RAM during nix
  package downloads in the live session (was causing OOM with 4GB)
- sha256sum tee: add || true so pipefail doesn't mark BUILD FAILED
  when sha256sum writes to the Docker-relative path after the ISO
  is already successfully created outside the container
2026-04-23 09:07:47 +02:00
mozempk
2fd857145b fix: set fallback DNS 8.8.8.8 in live-setup.sh at boot
When the DHCP-provided nameserver fails (QEMU 10.0.2.3, slow/broken DNS),
first-login.sh would spin forever waiting for network. Add a live-setup.sh
step that replaces 10.0.2.3 with 8.8.8.8/1.1.1.1 so first-login always
has working DNS immediately on login.
2026-04-23 08:56:46 +02:00
mozempk
2bab5d80d9 fix: replace getent DNS check with curl in first-login.sh
getent blocks indefinitely when the nameserver is unreachable (QEMU 10.0.2.3,
or any network where DNS responds slowly). Replace with curl --connect-timeout 3
which has a hard 3s per-attempt timeout and is independent of the NSS stack.
2026-04-23 08:27:39 +02:00
mozempk
941f906e29 fix: Nemo terminal/keymap/vscode — alacritty default, CH+FR lock, code action
- dconf 00-cinnamon: add org.cinnamon+gnome.desktop.default-applications.terminal
  exec='alacritty' exec-arg='-e' so Nemo right-click → Open in Terminal works
- dconf locks/keyboard: lock input-sources/sources and terminal exec keys so
  csd-keyboard doesn't reset them to defaults on first session start
- build-live-iso.sh: add code-open wrapper script (/usr/local/bin/code-open)
  that finds 'code' in the live user's nix profile; add open-in-vscode
  Nemo action to /usr/share/nemo/actions/
- config/install.conf: add nixpkgs#vscode to NIX_USER_PACKAGES
- packages.live-desktop.list: add setxkbmap (needed by csd-keyboard to
  apply XKB keyboard layout)
2026-04-23 08:10:10 +02:00
mozempk
c462bd9d31 fix: nix profile circular symlink, mdns hang, deprecated install command
- first-login.sh: remove nix-env --switch-profile (caused .nix-profile->
  .nix-profile circular symlink, breaking all nix profile commands and
  causing ELOOP on any exec via nix PATH including xz/tar/node)
- first-login.sh: add circular symlink guard before nix profile add
- first-login.sh: nix profile install -> nix profile add (deprecated alias)
- live-setup.sh: strip mdns from nsswitch.conf hosts line at boot (no
  libnss_mdns/Avahi in live; caused first-login DNS hang)
- docs/LIVE_ISO.md: document all three issues and their fixes
2026-04-23 08:01:11 +02:00
mozempk
5cd9b496fd feat: live ISO — nix daemon mode, autologin fix, GPU detection, app stack
- Switch nix from single-user to daemon mode (trusted-users = root live);
  Void socket at /var/nix/daemon-socket/socket confirmed
- Fix lightdm autologin: use session-wrapper=/etc/lightdm/Xsession (Void
  lightdm 1.32 has no lightdm-session binary)
- Fix session env: LIBGL_ALWAYS_SOFTWARE=1 via profile.d (session-env=
  is unsupported in this lightdm version)
- GPU auto-detection at boot: VIRT→software GL, NVIDIA PRIME offload,
  Intel/AMD/generic→modesetting
- Add nix-daemon to live runsvdir/default; remove unsupported -S mklive flag
- first-login.sh: install Claude Code + nix user packages (google-chrome,
  spotify, discord, localsend, mission-center) + NVM/node + VS Code exts
- build-live-iso.sh: write nix-packages.list from NIX_USER_PACKAGES
- postinstall.sh: fix nix-daemon socket path to /var/nix/daemon-socket/socket
- Dockerfile: add dconf-cli for build-time dconf compile
- _inner-build-live.sh: use correct 'dconf compile' API (not 'dconf update')
- .gitignore: add build/live-includes/ (generated staging tree)
- docs/LIVE_ISO.md: document all findings, gotchas and architecture
2026-04-23 07:42:35 +02:00
mozempk
6269f2f877 feat: add live desktop ISO build (stable-cinnamon Cinnamon live session) 2026-04-23 00:02:21 +02:00
mozempk
a16ac37d20 feat: initial commit — void-installer multi-profile (stable-cinnamon + mainline-niri) 2026-04-22 23:53:16 +02:00