aboutsummaryrefslogtreecommitdiffstats
path: root/openspec/changes/archive/2026-09-18-add-nix-flake-bootstrap/proposal.md
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <tom@vanderlee.io>2026-09-18 15:12:24 +0200
committerGravatar Tom van der Lee <tom@vanderlee.io>2026-09-18 15:12:24 +0200
commit4937d0d6f29895b514dcf8cd20c73a1aec446144 (patch)
tree7ff388ba4cca94e95489d30452b25badd7e49aa9 /openspec/changes/archive/2026-09-18-add-nix-flake-bootstrap/proposal.md
parent72b640f5ae65755c1d932b7b8ee88d2367e4036f (diff)
downloaddesktop-flake-4937d0d6f29895b514dcf8cd20c73a1aec446144.tar.gz
desktop-flake-4937d0d6f29895b514dcf8cd20c73a1aec446144.tar.bz2
desktop-flake-4937d0d6f29895b514dcf8cd20c73a1aec446144.zip
Archive four completed changes, sync main specs
add-nix-flake-bootstrap, add-host-bootstrap-script, add-dotfiles-stow-bootstrap, and add-developer-environment all had every task complete (verified via a real nix flake check and a real NixOS host build). Archived in dependency order so the two changes sharing the nix-flake-bootstrap capability merged additively. Main specs now exist for the first time: nix-flake-bootstrap (10 requirements), dotfiles-management (4), developer-environment (4). add-gnome-desktop remains active (not yet implemented).
Diffstat (limited to 'openspec/changes/archive/2026-09-18-add-nix-flake-bootstrap/proposal.md')
-rw-r--r--openspec/changes/archive/2026-09-18-add-nix-flake-bootstrap/proposal.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/openspec/changes/archive/2026-09-18-add-nix-flake-bootstrap/proposal.md b/openspec/changes/archive/2026-09-18-add-nix-flake-bootstrap/proposal.md
new file mode 100644
index 0000000..50f0db3
--- /dev/null
+++ b/openspec/changes/archive/2026-09-18-add-nix-flake-bootstrap/proposal.md
@@ -0,0 +1,31 @@
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.