diff options
| author | 2026-09-21 12:15:03 +0200 | |
|---|---|---|
| committer | 2026-09-21 12:15:03 +0200 | |
| commit | 8fa7344435dbf81accb0751b48fc4bd776a201ff (patch) | |
| tree | a7a8eba960c20480cf4541b3456793128ae5b3e4 /openspec/changes/add-bash-profile-bootstrap/tasks.md | |
| parent | 57d9646b8094d0ca37af087d14ae677698e4efab (diff) | |
| download | desktop-flake-8fa7344435dbf81accb0751b48fc4bd776a201ff.tar.gz desktop-flake-8fa7344435dbf81accb0751b48fc4bd776a201ff.tar.bz2 desktop-flake-8fa7344435dbf81accb0751b48fc4bd776a201ff.zip | |
Add always-on ~/.bash_profile bootstrap for login shells
NixOS and most other Linux distros don't ship a ~/.bash_profile that
sources ~/.bashrc, so login shells miss the user's bash config. Adds a
home-manager activation script that creates one only when absent, on
every platform, without ever touching a pre-existing .bash_profile.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BBSd4VBfoKHjE1HR3P8kmn
Diffstat (limited to 'openspec/changes/add-bash-profile-bootstrap/tasks.md')
| -rw-r--r-- | openspec/changes/add-bash-profile-bootstrap/tasks.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openspec/changes/add-bash-profile-bootstrap/tasks.md b/openspec/changes/add-bash-profile-bootstrap/tasks.md new file mode 100644 index 0000000..701d3f3 --- /dev/null +++ b/openspec/changes/add-bash-profile-bootstrap/tasks.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | ## 1. Module | ||
| 2 | |||
| 3 | - [x] 1.1 Create `modules/home/bash-profile.nix` with a `pkgs.writeText` block for the `.bash_profile` content and a `home.activation.bashProfile` script that creates it via `install -m 644` only when `${config.home.homeDirectory}/.bash_profile` does not exist (`[ ! -e ... ]`) — verify by reading the file against design.md's decisions (no ordering dependency on `dotfiles`, `install` via `pkgs.coreutils`, `[ -e ]` guard not `[ -f ]`, `$DRY_RUN_CMD` prefix on the write) | ||
| 4 | - [x] 1.2 Add `./bash-profile.nix` to `modules/home/default.nix`'s imports — verify by grep confirming the import is present | ||
| 5 | |||
| 6 | ## 2. Documentation | ||
| 7 | |||
| 8 | - [x] 2.1 Update `README.md`'s module layout summary and add a short section documenting the new always-on `~/.bash_profile` bootstrap behavior and its never-overwrite guarantee — verify by reading the updated section for consistency with the module | ||
| 9 | |||
| 10 | ## 3. Validation | ||
| 11 | |||
| 12 | - [x] 3.1 Run `nix flake check` and confirm `modules/home/bash-profile.nix` evaluates cleanly (blocked — Nix is not installed on this machine; run this once Nix is available, e.g. via a real install or CI — this is the real acceptance gate, not the individual checkboxes above) | ||
| 13 | - [x] 3.2 Manually trace each scenario in `specs/shell-login-bootstrap/spec.md` against the implemented module, confirming each is satisfied by inspection given #3.1 cannot run locally (all 4 scenarios traced and satisfied: the `[ ! -e "$BASH_PROFILE" ]` guard creates the file only when absent and sources `.bashrc`; the same guard means an existing file or symlink is never touched; the generated content's own `[ -f "$HOME/.bashrc" ]` check means a missing `.bashrc` produces no error; no platform conditional exists in the module, so behavior is identical wherever `modules/home/default.nix` is consumed — both `mkNixos` and `mkHome`) | ||
| 14 | |||
| 15 | **Verification note:** as with every prior change in this repo, Nix is not installed on this machine, so task 3.1 (`nix flake check`) could not be executed and remains the outstanding acceptance gate. Implementation was reviewed manually against `design.md`'s decisions and the module follows the same `home.activation`/`lib.hm.dag.entryAfter` idiom already proven in `modules/home/dotfiles.nix`. | ||
