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:
+8
-1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user