Commit graph

31 commits

Author SHA1 Message Date
randogoth
9f28569fef shell-init: record the first command of every shell in atuin
bash-preexec arms its DEBUG trap from __bp_interactive_mode at the end of
PROMPT_COMMAND, but its lazy installer runs mid-way through the first prompt
because zoxide and ghostty append their hooks after it. Those hooks disarm the
trap again, so the first interactive command of every session never reached
preexec and atuin silently dropped it.

Arm from PS0 instead, which is expanded once per interactive command before the
DEBUG trap and is therefore independent of PROMPT_COMMAND ordering.

Also guard the script against running twice: it is installed as both
loginShellInit and interactiveShellInit, and /etc/profile sources /etc/bashrc,
which registered starship's precmd/preexec hooks twice in every login shell.
2026-08-28 16:06:09 +03:00
randogoth
b7bb444f3d fix(shell): let bash-preexec install last so atuin preexec fires
Eagerly calling __bp_install at source time made bash-preexec install
before starship/atuin/zoxide/ghostty modified PROMPT_COMMAND, so their
hooks landed after __bp_interactive_mode. bash-preexec then never marked
typed commands as interactive and skipped preexec_functions, so atuin's
__atuin_preexec never fired and history stopped recording
(ATUIN_PREEXEC_BACKEND stuck at "<shlvl>:none").

Remove the eager __bp_install and the manual PROMPT_COMMAND/array wiring
for starship, atuin and zoxide; each tool registers with bash-preexec
itself, and deferred install on the first prompt keeps
__bp_interactive_mode last (verified against bash-preexec 0.6.0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 16:13:30 +03:00
randogoth
078c90c462 hm fixes 2026-02-09 20:15:44 +02:00
randogoth
09d1587e9f shell init log permission fix 2026-02-05 07:41:25 +02:00
randogoth
38647526ff fix(shell): avoid shared /tmp shell-init.log 2026-02-05 07:32:54 +02:00
randogoth
85b21cc6ea Revert "fix(shell): disable init logging by default"
This reverts commit e4fcf78b09.
2026-02-05 07:28:38 +02:00
randogoth
e4fcf78b09 fix(shell): disable init logging by default 2026-02-05 07:24:59 +02:00
randogoth
bb138278f1 refactor: make nanuqsaurus module-based; keep btrfs install profile 2026-02-04 20:53:05 +02:00
randogoth
fccf4fb972 refactor(hosts): make nanuqsaurus adopt default 2026-02-04 17:25:54 +02:00
randogoth
973bac7ed0 feat(install): add disko direct-url workflow 2026-02-04 15:57:45 +02:00
randogoth
7a42926fba nicer scripts 2026-02-04 15:21:29 +02:00
randogoth
b6e2e95371 Enable virt-manager and streamline shell init 2026-02-03 18:36:21 +02:00
randogoth
c24571128b Set Logo Menu defaults and finalize flatpak setup 2026-02-03 17:58:54 +02:00
randogoth
879754cb8d Add shell module and bootstrap fixes 2026-02-02 22:07:23 +02:00
randogoth
280f83488b home-manager and just optimizations 2026-02-02 21:30:08 +02:00
randogoth
d1713bdc99 Add HM bootstrap script and tidy installer workflow 2026-02-02 14:04:56 +02:00
randogoth
36fb3bd193 Keep local host/hardware files, default hostname nanuqsaurus 2026-02-01 22:14:04 +02:00
randogoth
91a4b180a4 Set installer default hostname back to nanuqsaurus 2026-02-01 22:08:28 +02:00
randogoth
e927339625 Split ISO config from installed hosts; auto-include gnome in generated host 2026-02-01 22:06:30 +02:00
randogoth
6b479a0c55 customizations 2026-02-01 21:24:00 +02:00
randogoth
0855829781 removed unnecessary command 2026-02-01 21:06:31 +02:00
randogoth
ba787cbda7 Ensure /mnt/tmp exists with 1777 before nixos-install 2026-02-01 21:02:31 +02:00
randogoth
09eccf1708 Use nixos-install without log-format for compatibility 2026-02-01 21:00:11 +02:00
randogoth
9e6d7a5a88 Default install host to installer 2026-02-01 20:52:03 +02:00
randogoth
9dbb211285 Add logging and no-root-passwd to installer 2026-02-01 20:49:25 +02:00
randogoth
cd49f479dd Simplify installer script to non-interactive flow 2026-02-01 20:43:53 +02:00
randogoth
defa82c46c Fix disk selection for installer prompts 2026-02-01 20:35:07 +02:00
randogoth
3a4b57516f Hint secure boot imports in generated host 2026-02-01 20:15:05 +02:00
randogoth
906a668987 Add default admin user and include in host/installer 2026-02-01 19:54:28 +02:00
randogoth
e5118737af Default installer hostname to nanuqsaurus 2026-02-01 19:53:04 +02:00
randogoth
97c865d91b Add Lix-based NixOS installer ISO and interactive script 2026-02-01 19:43:03 +02:00