From c4e17c46164d317f332bb66d0919c692465ae59c Mon Sep 17 00:00:00 2001 From: Coding Agent Date: Fri, 4 Sep 2026 23:24:04 +0000 Subject: [PATCH] fix: pin Nix lookup outside login shells Set the global nix-path from the declarative NIX_PATH list so a clean environment resolves the same locked Nixpkgs. Keep old root channel profiles for recovery rather than deleting them to silence the activation warning. --- README.md | 2 +- configuration.nix | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f67257a..763076e 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ nix --extra-experimental-features 'nix-command flakes' build \ Then review/apply the resulting closure as above. The configuration creates `dev`, sets permissions and deploys its files. **No separate Neovim clone, copy, useradd, chown or global Git-config recipe is required.** -This host build does not use a mutable channel. NixOS's native flake integration also pins the `nixpkgs` registry entry and `` lookup to the system input. Dev-environment templates/composition remain deferred; there is no flake framework here. +This host build does not use a mutable channel. NixOS's native flake integration pins the `nixpkgs` registry entry and login-shell `` lookup to the system input; the global `nix-path` setting keeps the same pin when `NIX_PATH` is unset. Old root channel profiles are retained for recovery, not used as build inputs. Dev-environment templates/composition remain deferred; there is no flake framework here. ## Neovim: import, do not rewrite diff --git a/configuration.nix b/configuration.nix index 339470e..11b4d89 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,9 @@ -{ inputs, modulesPath, ... }: +{ + config, + inputs, + modulesPath, + ... +}: { imports = [ @@ -13,6 +18,8 @@ nix = { channel.enable = false; + # Keep non-login environments on the same pin when NIX_PATH is unset. + settings.nix-path = config.nix.nixPath; settings.experimental-features = [ "nix-command" "flakes"