From 44ffb85896ae518a46c08608e7f1879ec4a5ee4e Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 5 Dec 2015 14:21:01 +0100 Subject: profiles/common: Add NIXPKGS_CONFIG env variable. Having in PATH doesn't help in anything if we actually forget to add the right environment variable where we import the from NIX_PATH. The reason why I choose to use instead of directly specifying the config in NIXPKGS_CONFIG is that we now have _one_ environment variable (NIX_PATH) to override everything from the version to its config. Signed-off-by: aszlig --- modules/profiles/common.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/profiles/common.nix b/modules/profiles/common.nix index 0be2be96..39535d4f 100644 --- a/modules/profiles/common.nix +++ b/modules/profiles/common.nix @@ -56,6 +56,14 @@ with lib; "headcounter.org:/7YANMvnQnyvcVB6rgFTdb8p5LG1OTXaO+21CaOSBzg=" ]; + environment.variables.NIXPKGS_CONFIG = let + nixpkgsCfg = toString (pkgs.writeText "nixpkgs-try-config.nix" '' + if (builtins.tryEval ).success + then import + else {} + ''); + in mkIf config.vuizvui.enableGlobalNixpkgsConfig (mkForce nixpkgsCfg); + nix.nixPath = let nixpkgs = import ../../nixpkgs-path.nix; rootChannelsPath = "/nix/var/nix/profiles/per-user/root/channels"; -- cgit 1.4.1