diff options
Diffstat (limited to 'openspec/changes/add-bash-profile-bootstrap/proposal.md')
| -rw-r--r-- | openspec/changes/add-bash-profile-bootstrap/proposal.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/openspec/changes/add-bash-profile-bootstrap/proposal.md b/openspec/changes/add-bash-profile-bootstrap/proposal.md new file mode 100644 index 0000000..6991c2a --- /dev/null +++ b/openspec/changes/add-bash-profile-bootstrap/proposal.md | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | ## Why | ||
| 2 | |||
| 3 | NixOS (and most other Linux distros) don't ship a `~/.bash_profile` that sources `~/.bashrc`, so login shells never pick up the user's bash config — only interactive non-login shells do. This repo made bash the primary managed shell in an earlier change (`add-developer-environment`), and the real `.bashrc` lives in the user's external dotfiles repo (`~/dotfiles/bash/.bashrc`, stowed to `~/.bashrc` by `modules/home/dotfiles.nix`), so this gap is real on any freshly provisioned machine. | ||
| 4 | |||
| 5 | ## What Changes | ||
| 6 | |||
| 7 | - Add a new home-manager activation script that creates `~/.bash_profile` (sourcing `~/.bashrc` if present) only when `~/.bash_profile` does not already exist. An existing `~/.bash_profile`, in any form (regular file or symlink), is never modified. | ||
| 8 | - Applies unconditionally on every platform this flake targets (Linux and macOS) — not gated by `home.dotfiles.repoUrl` — since the exists-check itself is what keeps it safe everywhere, including on a machine with an existing, repo-unmanaged `~/.bash_profile`. | ||
| 9 | |||
| 10 | ## Capabilities | ||
| 11 | |||
| 12 | ### New Capabilities | ||
| 13 | - `shell-login-bootstrap`: ensures a login shell sources `~/.bashrc` via `~/.bash_profile`, creating that file only when it doesn't already exist, on every platform this flake targets. | ||
| 14 | |||
| 15 | ### Modified Capabilities | ||
| 16 | (none — `dotfiles-management`'s existing "a conflicting package does not block the others" requirement already covers the rare case where a dotfiles-repo-provided `.bash_profile` package races against this file; no requirement of that capability changes) | ||
| 17 | |||
| 18 | ## Impact | ||
| 19 | |||
| 20 | - Affected code: a new `modules/home/` module, registered in `modules/home/default.nix`'s imports; `README.md`'s documentation of the home-manager module layout and shell setup. | ||
| 21 | - Applies to every `homeConfigurations`/`nixosConfigurations` output built from the shared home profile (both `tom@linux` and `tom@darwin`, plus any future NixOS host). | ||
| 22 | - No change to `dotfiles.nix` or its behavior. | ||
