Commit Graph

26 Commits (f0db333fa4f10c66cb6c6336385e9b354e5e923d)

Author SHA1 Message Date
Amir Alexander Abdelbaki f0db333fa4 fix(installer): stop sudo re-prompting during in-chroot module install
The base installers granted wheel sudo with `echo '%wheel ... ALL' >> /etc/sudoers`.
Because the stock sudoers ends with `@includedir /etc/sudoers.d`, that appended
rule is parsed AFTER the drop-ins, and since sudo applies the last matching rule,
it overrode the temporary 99-setup-nopasswd NOPASSWD rule — so the user had to
re-enter their password on every pacman/yay/flatpak call while the TUI installed
modules.

Grant wheel via /etc/sudoers.d/10-wheel instead, which sorts before
99-setup-nopasswd so NOPASSWD wins during the TUI run and password auth resumes
once the temp file is removed. Also guard that @includedir is present (so the
drop-ins are always read) and set both drop-ins to the canonical 0440 mode.
Applied to both archbaseos-guided-install.sh and arch-autoinstall.sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 19:39:32 +02:00
Amir Alexander Abdelbaki a09d509da8 fix(installer): address remaining sanity-check issues (LUKS2, lvm2, FIDO2, plymouth)
- arch-autoinstall.sh: use --type luks2 so systemd-cryptenroll can enroll FIDO2
- arch-autoinstall.sh: drop spurious lvm2 initramfs hook (no LVM in use)
- arch-autoinstall.sh: mkinitcpio -P (all presets) instead of -p <kernel>
- arch-autoinstall.sh: add rd.luks.options=fido2-device=auto to GRUB cmdline
- arch-autoinstall.sh: move pamu2fcfg outside chroot (host udev owns /dev/hidraw*)
- generate-answerfile.sh: remove plymouth from core components checklist
- tui-install.sh: component dialog list-height 5→4 (plymouth was removed)
- tui-install.sh: correct stale comment about word-boundary glob matching

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MibNTaLZrLnqyAzVCQe1YA
2026-06-26 14:25:06 +02:00
Amir Alexander Abdelbaki a92de3193a fix(installer): address issues 2-8 from sanity check
#2 — Word-boundary match for all module patterns
  Generator now pads SELECTED_APPS with spaces and uses *" id "* in
  counters, summary, and dispatch, matching the conflict fix from #1.
  plymouth-custom no longer false-triggers any plymouth check.

#3 — Guided installer now runs tui-install.sh
  archbaseos-guided-install.sh was calling simple-install.sh; both
  paths now use the full TUI (sentinel-managed, modules.conf-driven).

#4 — EFI/boot partition size unified at 10 GiB
  arch-autoinstall.sh was 15 GiB, archbaseos-guided-install.sh was
  5 GiB. Both now use 10 GiB.

#5 — Interactive retry for dotfiles clone (guided installer)
  Clone moved outside the chroot heredoc so read() reaches the terminal.
  Loops until success or the user skips; AF_MODE warns and continues.

#6 — PAM target unified on system-local-login
  archbaseos-guided-install.sh was writing to system-auth (affects
  sudo). Both installers now target system-local-login only.

#7 — Redundant second clone removed from autoinstaller
  arch-autoinstall.sh had a second git clone inside the chroot as a
  fallback that collided with the skel copy and printed a spurious
  warning. Removed; skel-only approach matches the guided installer
  (last updated). Also removed the individual .zshrc/.bashrc/.vimrc
  cp block; aligned to the guided installer's cleaner skel structure.

#8 — Docs: remove stale plymouth core-module section
  docs/md/modules.md still described plymouth under Core Modules.
  Section removed; plymouth appears in Optional Applications (system
  category) via the generated sentinel.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 14:12:09 +02:00
Amir Alexander Abdelbaki cb464c830f chore: add inline comments across all modules and configs 2026-06-25 13:07:06 +02:00
Amir Alexander Abdelbaki 7627dd67ff feat(setup): seed /etc/skel from installed user's ~/.config after all modules run
Problem: every module installs its config into the running user's ~/.config, but
/etc/skel was never updated afterwards. Any additional user created with
`useradd -m` later would get an empty home directory with no configs at all —
they would have to manually copy or re-run setup.

Solution: at the end of both TUI installer scripts (after every module and the
colorway step have finished), copy the fully-configured user's home into
/etc/skel so that it becomes the template for all future users.

How it works — tui-install.sh + simple-install.sh (identical block in both):

  The block runs AFTER the last run_module call and AFTER apply-theme.sh, so
  the snapshot is taken when the home directory is in its final state. It copies:

    ~/.config/  → /etc/skel/.config/    (all app configs, DE configs, etc.)
    ~/.themes/  → /etc/skel/.themes/    (GTK themes, including cyberqueer)
    ~/.zshrc    → /etc/skel/.zshrc
    ~/.bashrc   → /etc/skel/.bashrc
    ~/.vimrc    → /etc/skel/.vimrc

  Each copy is guarded ([[ -d ]] / [[ -f ]]) so missing files are silently
  skipped rather than erroring. sudo is used because /etc/skel is root-owned
  but the installer runs as the normal user.

arch-autoinstall.sh + archbaseos-guided-install.sh (chroot-phase changes):

  The previous version tried to cherry-pick specific subdirectories from the
  Dotfiles repo clone (hypr/, niri/, waybar/, etc.) using a long list of cp
  commands. This was brittle — any new module that installs to ~/.config was
  not automatically captured, and the list had to be manually maintained.

  Replaced with a minimal block that only copies the three shell dotfiles
  (.zshrc, .bashrc, .vimrc) from the repo clone into /etc/skel. This is
  sufficient for the first user created during installation (useradd -m runs
  immediately after, before any modules). The full ~/.config sync above then
  takes over for all subsequent users after the modules have run.

  arch-autoinstall.sh additionally had the skel setup moved to before the
  useradd -m call (was missing entirely before) so even the first user gets
  the shell dotfiles, with a fallback direct-clone path if the skel clone fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 10:19:06 +02:00
Amir Alexander Abdelbaki 33d2fe7715 fix(installer): replace nmtui with iwctl instructions in network check
nmtui is not available on the archiso live environment; direct users to
iwctl (WiFi) or ethernet instead, and pause for input before re-checking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 23:47:36 +02:00
Amir Alexander Abdelbaki 1f1e9f6f9c fix(installer): fix tui-install on bare console + add network check to archiso installers
tui-install.sh: dialog height=40 apps checklist and height=24 confirm
dialog both exceeded the standard 24-row VT console, causing dialog to
exit with code 1 and silently skip all apps. Make both heights
terminal-adaptive via tput lines/cols. Also extend the EXIT trap to
reset the terminal so Ctrl-C during a dialog doesn't leave the console
in raw/no-echo mode.

arch-autoinstall.sh, archbaseos-guided-install.sh: add a ping 1.1.1.1
check early in both scripts. In interactive mode, launches nmtui if
offline, then re-checks; prompts to abort if still down. Answerfile
mode logs a warning and continues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 21:18:46 +02:00
Amir Alexander Abdelbaki dbb1be0081 fix(installer): show password input in plain text
Remove -s flag from read so the password is visible while typing,
enabling piped input to work visibly on the ISO installer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 20:45:17 +02:00
Amir Alexander Abdelbaki a0a2b66ccf feat(installer): show croc log-send TUI on install error
On any ERR, both installers now trap the failure, log the line/exit
code, and pop a dialog yes/no asking whether to send the log to another
system via croc. Falls back to a plain read prompt if dialog is absent.
Added dialog and croc to packages.extra so they are present in the live ISO.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 19:28:43 +02:00
Amir Alexander Abdelbaki 319af7bde7 fix(installer): add logging to guided installer and fix NVMe partition naming
- Add full session logging (tee to logfile) to archbaseos-guided-install.sh,
  matching the pattern already in arch-autoinstall.sh; copy log to /mnt/boot/
  at the end so it survives into the new system
- Add part() helper to both installers so NVMe/eMMC drives use the correct
  'p' separator (e.g. /dev/nvme0n1p1 instead of the broken /dev/nvme0n11)
- Add disk size guard to arch-autoinstall.sh: fail early with a clear message
  if ROOT_GIB would be < 8GiB instead of passing a nonsense value to parted

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 18:54:57 +02:00
Amir Alexander Abdelbaki 6ccc91303f fix(setup): port KEYMAPS+vconsole support to auto-installer and answerfile generator
arch-autoinstall.sh was missing the keymap handling added to the guided
installer in the previous two commits, so booting the ISO in auto mode
(answerfile embedded) never called loadkeys and left the installed system
with no /etc/vconsole.conf.

- Add the same KEYMAPS array + selection logic to arch-autoinstall.sh
  (AF mode reads .keymap, interactive mode prompts)
- Call loadkeys and export KEYMAP into the chroot
- Write /etc/vconsole.conf inside the chroot
- Add keymap dialog to generate-answerfile.sh so the field is populated
- Document .keymap in the arch-autoinstall.sh answerfile field list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 00:01:19 +02:00
Amir Alexander Abdelbaki e25dd231cb installer: add no-encryption option and auto LUKS backup key
Both arch-autoinstall.sh and archbaseos-guided-install.sh now ask
whether to enable disk encryption. If skipped, btrfs is formatted
directly on the root partition with an appropriate plain GRUB cmdline
(root=UUID=... rootflags=subvol=@).

When encryption is chosen, a 64-byte random key is generated, enrolled
as a second LUKS keyslot, and written to /_LUKS_BACKUP_KEY inside the
new system (mode 400, root-owned, inside the encrypted container).

Also fixes: duplicate 'encrypt' hook in original mkinitcpio HOOKS
strings, missing KERNEL export into arch-autoinstall chroot heredoc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 15:24:29 +02:00
Amir Alexander Abdelbaki a56d27888c setup: add archiso profile and run tui-install inside chroot
- Add setup/archiso/ with build.sh, releng overlay, motd, and
  install-arch launcher command for the live ISO
- Fix cryptroot mapper name in arch-autoinstall.sh (was 'root',
  breaking all subsequent mounts)
- Add base-devel to pacstrap in both installers (required for yay/makepkg)
- Clone dotfiles inside chroot so tui-install.sh is available immediately
- After base install, offer to run tui-install.sh as the regular user
  inside the chroot via runuser, with a temporary NOPASSWD sudoers rule;
  skip option available for base-only installs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 13:46:49 +02:00
Amir Alexander Abdelbaki fef9cfc235 Update setup/arch-autoinstall.sh 2025-12-03 09:54:04 +01:00
Amir Alexander Abdelbaki 91ed6145b9 set bootloader ID 2025-12-03 09:52:48 +01:00
Amir Alexander Abdelbaki e786e66b59 being extra safe with the KMs i'm adding 2025-12-03 09:45:36 +01:00
Amir Alexander Abdelbaki 6a2e6be98e added more initramfs hooks 2025-12-03 09:35:13 +01:00
Amir Alexander Abdelbaki ab1ae16319 fixed Cryptsetup command mayyybeeeee????? 2025-12-03 09:25:51 +01:00
Amir Alexander Abdelbaki b59212937d var fix kernel install? 2025-11-29 15:35:39 +01:00
Amir Alexander Abdelbaki 7594ae1e91 pactrap -K 2025-11-29 15:24:59 +01:00
Amir Alexander Abdelbaki daa8490601 manually set kernel when mkinicpio 2025-11-29 15:01:18 +01:00
Amir Alexander Abdelbaki 486f32443b chmod 2025-11-29 12:58:03 +01:00
Amir Alexander Abdelbaki 82742c122c install now get left in bootpart 2025-11-29 12:53:50 +01:00
Amir Alexander Abdelbaki 110e55ee11 autoinstall logging - vars 2025-11-29 12:05:32 +01:00
Amir Alexander Abdelbaki 992dcbafaf autoinstall logging 2025-11-29 11:59:33 +01:00
Amir Alexander Abdelbaki 533932c02c also why not pass it to another llm, to speed the BS up 2025-11-29 05:21:34 +01:00