From a6e0ae7b4eb877d0c22ae84ee55d6a85618ca4c1 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Mon, 21 Sep 2026 14:48:49 +0200 Subject: Archive completed changes, sync editor-environment and shell-login-bootstrap specs fix-deprecation-warnings, fix-neovim-plugin-loading, and add-bash-profile-bootstrap all had every task complete; archived all three. Synced the editor-environment and shell-login-bootstrap delta specs into main specs (fix-deprecation-warnings had no delta specs). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01BBSd4VBfoKHjE1HR3P8kmn --- openspec/specs/editor-environment/spec.md | 28 ++++++++++++++++++++++ openspec/specs/shell-login-bootstrap/spec.md | 35 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 openspec/specs/editor-environment/spec.md create mode 100644 openspec/specs/shell-login-bootstrap/spec.md (limited to 'openspec/specs') diff --git a/openspec/specs/editor-environment/spec.md b/openspec/specs/editor-environment/spec.md new file mode 100644 index 0000000..61fd48b --- /dev/null +++ b/openspec/specs/editor-environment/spec.md @@ -0,0 +1,28 @@ +# editor-environment Specification + +## Purpose + +Governs what the shared home-manager profile provisions for the default editor (Neovim): the package and wrapper itself, non-interference with the user's externally-managed dotfiles editor configuration, and the native build toolchain that natively-built plugins in that configuration need. + +## Requirements + +### Requirement: Neovim is provisioned as the default editor +The shared home-manager profile SHALL install Neovim, set it as the default `$EDITOR`/`$VISUAL`, and provide a `vim` alias pointing to it, identically wherever the profile is activated (standalone or via a NixOS host). + +#### Scenario: Neovim available after activation +- **WHEN** the shared home profile is activated on any supported platform +- **THEN** the `nvim` binary is on `PATH`, `$EDITOR`/`$VISUAL` resolve to `nvim`, and `vim` invokes `nvim` + +### Requirement: Home-manager does not manage Neovim's config directory +The shared home-manager profile SHALL NOT write its own generated content to the user's Neovim configuration directory (`$XDG_CONFIG_HOME/nvim`), so that a separately-managed, externally-owned configuration (such as a personal dotfiles repository symlinked into place by another mechanism) can occupy that path without conflict. + +#### Scenario: Config directory left free for external ownership +- **WHEN** the shared home profile is activated, independent of whether an external configuration has been placed at `$XDG_CONFIG_HOME/nvim` yet +- **THEN** no file under `$XDG_CONFIG_HOME/nvim` is created, modified, or symlinked by the home-manager-managed profile itself + +### Requirement: A native build toolchain is available for editor plugins +The shared home-manager profile SHALL provide a C compiler and the `tree-sitter` CLI on `PATH`, so that natively-built Neovim plugins configured by an externally-managed configuration can compile successfully, on every platform this flake targets. + +#### Scenario: Compiler and tree-sitter CLI available after activation +- **WHEN** the shared home profile is activated on NixOS or Darwin +- **THEN** a working C compiler (`cc`) and the `tree-sitter` CLI are both resolvable on `PATH` without any additional manual installation step diff --git a/openspec/specs/shell-login-bootstrap/spec.md b/openspec/specs/shell-login-bootstrap/spec.md new file mode 100644 index 0000000..3bf6246 --- /dev/null +++ b/openspec/specs/shell-login-bootstrap/spec.md @@ -0,0 +1,35 @@ +# shell-login-bootstrap Specification + +## Purpose + +Ensures a login shell actually loads the user's bash configuration, since NixOS and most other Linux distributions don't ship a `~/.bash_profile` that sources `~/.bashrc` by default — without ever touching a `~/.bash_profile` that already exists. + +## Requirements + +### Requirement: A missing `.bash_profile` is created to source `.bashrc` +If no `~/.bash_profile` exists, home-manager activation SHALL create one whose contents source `~/.bashrc`. + +#### Scenario: No `.bash_profile` exists +- **WHEN** activation runs and `~/.bash_profile` does not exist +- **THEN** a `~/.bash_profile` is created that sources `~/.bashrc` + +### Requirement: An existing `.bash_profile` is never modified +If `~/.bash_profile` already exists in any form (regular file or symlink), activation SHALL NOT create, overwrite, or otherwise modify it. + +#### Scenario: `.bash_profile` already exists +- **WHEN** activation runs and `~/.bash_profile` already exists +- **THEN** its contents are left completely unchanged, and no write is attempted + +### Requirement: The created file tolerates a missing `.bashrc` +The generated `~/.bash_profile` SHALL only attempt to source `~/.bashrc` if that file exists, so it never errors on a login shell that runs before `~/.bashrc` is otherwise provisioned. + +#### Scenario: `.bashrc` does not exist yet +- **WHEN** the generated `~/.bash_profile` runs and `~/.bashrc` does not exist +- **THEN** it does nothing further and produces no error + +### Requirement: Behavior is identical on every platform this flake targets +This capability SHALL apply unconditionally wherever the shared home-manager profile is activated — NixOS, standalone Linux, and macOS alike — gated only by whether `~/.bash_profile` already exists, not by operating system. + +#### Scenario: Activated on any supported platform +- **WHEN** the shared home profile is activated on NixOS, standalone Linux, or macOS +- **THEN** the same create-if-absent behavior for `~/.bash_profile` applies identically -- cgit v1.3