aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/home/dotfiles.nix4
-rw-r--r--modules/home/editor.nix4
-rw-r--r--openspec/changes/fix-deprecation-warnings/.openspec.yaml3
-rw-r--r--openspec/changes/fix-deprecation-warnings/proposal.md22
-rw-r--r--openspec/changes/fix-deprecation-warnings/tasks.md13
-rw-r--r--users/tom.nix2
6 files changed, 45 insertions, 3 deletions
diff --git a/modules/home/dotfiles.nix b/modules/home/dotfiles.nix
index 21afb5e..c45c996 100644
--- a/modules/home/dotfiles.nix
+++ b/modules/home/dotfiles.nix
@@ -7,8 +7,8 @@ let
7 # platform. Kept minimal and overridable via excludePackages rather than 7 # platform. Kept minimal and overridable via excludePackages rather than
8 # a full per-platform mapping - see design.md for alternatives considered. 8 # a full per-platform mapping - see design.md for alternatives considered.
9 platformDefaultExcludes = 9 platformDefaultExcludes =
10 lib.optionals (!pkgs.stdenv.isDarwin) [ "iterm2" ] 10 lib.optionals (!pkgs.stdenv.hostPlatform.isDarwin) [ "iterm2" ]
11 ++ lib.optionals (!pkgs.stdenv.isLinux) [ "herbstluftwm" "xorg" ]; 11 ++ lib.optionals (!pkgs.stdenv.hostPlatform.isLinux) [ "herbstluftwm" "xorg" ];
12 12
13 excludePackages = platformDefaultExcludes ++ cfg.excludePackages; 13 excludePackages = platformDefaultExcludes ++ cfg.excludePackages;
14in 14in
diff --git a/modules/home/editor.nix b/modules/home/editor.nix
index 413ca8f..792d878 100644
--- a/modules/home/editor.nix
+++ b/modules/home/editor.nix
@@ -9,6 +9,10 @@
9 # in separately. Without this, home-manager's own generated init.lua 9 # in separately. Without this, home-manager's own generated init.lua
10 # permanently conflicts with that stow package and it gets skipped. 10 # permanently conflicts with that stow package and it gets skipped.
11 sideloadInitLua = true; 11 sideloadInitLua = true;
12 # Pin the legacy (stateVersion < 26.05) provider defaults explicitly so
13 # this doesn't silently change if stateVersion is ever bumped.
14 withRuby = true;
15 withPython3 = true;
12 }; 16 };
13 17
14 # tree-sitter (parser compilation) and a C compiler for natively-built 18 # tree-sitter (parser compilation) and a C compiler for natively-built
diff --git a/openspec/changes/fix-deprecation-warnings/.openspec.yaml b/openspec/changes/fix-deprecation-warnings/.openspec.yaml
new file mode 100644
index 0000000..54f2ff0
--- /dev/null
+++ b/openspec/changes/fix-deprecation-warnings/.openspec.yaml
@@ -0,0 +1,3 @@
1schema: spec-driven
2created: 2026-09-21
3skip_specs: true
diff --git a/openspec/changes/fix-deprecation-warnings/proposal.md b/openspec/changes/fix-deprecation-warnings/proposal.md
new file mode 100644
index 0000000..0f1edb5
--- /dev/null
+++ b/openspec/changes/fix-deprecation-warnings/proposal.md
@@ -0,0 +1,22 @@
1## Why
2
3`nixos-rebuild`/`home-manager switch` on a real host now emits four evaluation warnings: `stdenv.isDarwin`/`stdenv.isLinux` are deprecated in favor of `stdenv.hostPlatform.isDarwin`/`.isLinux`, and `programs.neovim.withRuby`/`withPython3` warn that their default is changing and asks for an explicit value while `home.stateVersion` stays below "26.05". Left unset, these warnings will keep appearing on every activation, and the neovim providers' actual default would change out from under this flake the moment `stateVersion` is ever bumped, with no record of that being an intentional choice.
4
5## What Changes
6
7- Replace every `pkgs.stdenv.isDarwin`/`pkgs.stdenv.isLinux` usage with `pkgs.stdenv.hostPlatform.isDarwin`/`.isLinux` (`users/tom.nix`, `modules/home/dotfiles.nix`). Pure rename with identical semantics — no behavior change.
8- Explicitly set `programs.neovim.withRuby = true;` and `programs.neovim.withPython3 = true;` in `modules/home/editor.nix`, pinning today's legacy-default behavior on purpose rather than leaving it implicit and version-dependent. No behavior change.
9
10## Capabilities
11
12### New Capabilities
13(none)
14
15### Modified Capabilities
16(none — every change here preserves current externally observable behavior exactly; only the deprecated attribute names and an implicit default become explicit. `.openspec.yaml` sets `skip_specs: true` accordingly.)
17
18## Impact
19
20- Affected code: `users/tom.nix`, `modules/home/dotfiles.nix`, `modules/home/editor.nix`.
21- Affects every `homeConfigurations`/`nixosConfigurations` output built from the shared home profile, on both NixOS and Darwin.
22- Out of scope: the "Git tree is dirty" notice in the pasted warnings is expected uncommitted-changes noise from evaluating a local checkout, not a deprecation — not addressed here. Also out of scope: bumping `home.stateVersion` itself, which would pull in a much broader set of home-manager default changes beyond these two neovim options.
diff --git a/openspec/changes/fix-deprecation-warnings/tasks.md b/openspec/changes/fix-deprecation-warnings/tasks.md
new file mode 100644
index 0000000..0ffedfb
--- /dev/null
+++ b/openspec/changes/fix-deprecation-warnings/tasks.md
@@ -0,0 +1,13 @@
1## 1. Replace deprecated `stdenv.isDarwin`/`isLinux`
2
3- [x] 1.1 In `users/tom.nix`, replace `pkgs.stdenv.isDarwin` with `pkgs.stdenv.hostPlatform.isDarwin` in the `home.homeDirectory` conditional — verify by reading the file back and confirming the Darwin/Linux home path logic is otherwise unchanged
4- [x] 1.2 In `modules/home/dotfiles.nix`, replace `pkgs.stdenv.isDarwin`/`pkgs.stdenv.isLinux` with `pkgs.stdenv.hostPlatform.isDarwin`/`.isLinux` in `platformDefaultExcludes` — verify by reading the file back and confirming the excluded-package lists (`iterm2` on non-Darwin; `herbstluftwm`/`xorg` on non-Linux) are unchanged
5- [x] 1.3 Verify via `grep -rn "stdenv.isDarwin\|stdenv.isLinux" --include="*.nix" .` that no remaining usage exists outside `hosts/template/` (if any) (verified: zero matches anywhere in the repo, including `hosts/template/`)
6
7## 2. Pin Neovim provider defaults explicitly
8
9- [x] 2.1 In `modules/home/editor.nix`, add `withRuby = true;` and `withPython3 = true;` to the `programs.neovim` block — verify by reading the file back
10
11## 3. Validate
12
13- [x] 3.1 Run `nix flake check` (or `nixos-rebuild build`/`home-manager build`, wherever Nix is available) and confirm the four deprecation warnings no longer appear and all outputs still evaluate cleanly (blocked — Nix is not installed on this machine; run this once Nix is available, e.g. on the real host where the original warnings were observed — this is the real acceptance gate, not the individual checkboxes above). Reviewed manually instead: all three edited files were read back and are syntactically well-formed; `pkgs.stdenv.hostPlatform.isDarwin`/`.isLinux` is a straight rename of the same attribute path nixpkgs' `stdenv` exposes, and `withRuby`/`withPython3 = true;` matches the exact value the warning said was already in effect, so no other behavior should change
diff --git a/users/tom.nix b/users/tom.nix
index 08b30c3..cbbaff0 100644
--- a/users/tom.nix
+++ b/users/tom.nix
@@ -3,7 +3,7 @@
3 imports = [ ../modules/home ]; 3 imports = [ ../modules/home ];
4 4
5 home.username = "tom"; 5 home.username = "tom";
6 home.homeDirectory = if pkgs.stdenv.isDarwin then "/Users/tom" else "/home/tom"; 6 home.homeDirectory = if pkgs.stdenv.hostPlatform.isDarwin then "/Users/tom" else "/home/tom";
7 7
8 # Set once at first install/activation; never bump retroactively. 8 # Set once at first install/activation; never bump retroactively.
9 home.stateVersion = "24.05"; 9 home.stateVersion = "24.05";