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.
This commit is contained in:
Coding Agent
2026-09-04 23:24:04 +00:00
parent a6cd721bf0
commit c4e17c4616
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -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"