aboutsummaryrefslogtreecommitdiffstats
path: root/openspec/changes/add-nix-flake-bootstrap/proposal.md
diff options
context:
space:
mode:
Diffstat (limited to 'openspec/changes/add-nix-flake-bootstrap/proposal.md')
-rw-r--r--openspec/changes/add-nix-flake-bootstrap/proposal.md31
1 files changed, 0 insertions, 31 deletions
diff --git a/openspec/changes/add-nix-flake-bootstrap/proposal.md b/openspec/changes/add-nix-flake-bootstrap/proposal.md
deleted file mode 100644
index 50f0db3..0000000
--- a/openspec/changes/add-nix-flake-bootstrap/proposal.md
+++ /dev/null
@@ -1,31 +0,0 @@
1## Why
2
3This repo currently has no Nix configuration at all — zero `.nix` files, zero commits. The goal is a single flake that can bootstrap a fresh NixOS install after manual disk partitioning, and can also be installed on non-NixOS systems (any Linux now, macOS via nix-darwin later), sharing as much configuration as possible for a uniform experience while staying idiomatic and avoiding hacks.
4
5## What Changes
6
7- Add a `flake.nix` with `nixpkgs` and `home-manager` inputs (following the same `nixpkgs`), exposing `nixosConfigurations`, `homeConfigurations`, `formatter`, and `devShells` outputs.
8- Add `lib/mkNixos.nix` and `lib/mkHome.nix` — thin wrapper helpers around `nixpkgs.lib.nixosSystem` and `home-manager.lib.homeManagerConfiguration`, both consuming the same per-user module so NixOS and standalone home-manager activation stay in sync.
9- Add `modules/nixos/common.nix` — shared NixOS-only system settings (flakes enabled, base user skeleton, locale, gc policy) applied to every NixOS host.
10- Add `modules/home/*.nix` — the shared cross-platform home-manager profile (shell/zsh+starship+direnv, git, editor/neovim, CLI tools), consumed identically by NixOS's home-manager module and by standalone `home-manager switch`.
11- Add `users/tom.nix` — the identity/profile file both `mkNixos` and `mkHome` import, with platform-computed `home.homeDirectory`.
12- Add `hosts/template/` — a non-instantiated, copy-source-only NixOS host skeleton (`configuration.nix` + stub `hardware-configuration.nix`) used to bootstrap a real host after `nixos-generate-config`.
13- Add a `homeConfigurations."tom@linux"` output so the shared profile is a real, buildable standalone target in this change.
14- Add `README.md` documenting the NixOS install workflow (manual partition → `nixos-generate-config` → copy host template → `nixos-install --flake`) and the standalone workflow (install Nix → `home-manager switch --flake`).
15- Add `formatter` (`nixfmt-rfc-style`) and a `devShells.default` (`statix`, `deadnix`) for linting/formatting this repo itself.
16- Explicitly out of scope for this change: a concrete nix-darwin/macOS host, disko-based declarative partitioning, and any secrets management (agenix/sops-nix) — all deferred to follow-up changes.
17
18## Capabilities
19
20### New Capabilities
21- `nix-flake-bootstrap`: A flake that provisions NixOS hosts from a copyable template and provisions a shared, cross-platform home-manager user profile installable standalone on non-NixOS systems, with both consumption paths built from the same per-user module.
22
23### Modified Capabilities
24(none — greenfield repo, no existing specs)
25
26## Impact
27
28- Affected code: entirely new — `flake.nix`, `flake.lock`, `lib/`, `modules/`, `hosts/template/`, `users/`, `README.md`.
29- Dependencies introduced: `nixpkgs` (nixos-unstable), `home-manager` (following nixpkgs).
30- Systems affected: none yet running this config (dev machine `glootie` has no Nix installed; no NixOS host exists yet). This change only needs to be validated via `nix flake check` / building the `homeConfigurations."tom@linux"` output — it does not touch any live system.
31- Follow-up work (not part of this change): pushing the repo to a remote (needed before `nixos-install` can `git clone` it during a real install), adding a real NixOS host once hardware is partitioned, adding nix-darwin once a Mac is being configured, and adding secrets management.