@@ -44,10 +44,7 @@ let
4444 # for NIXOS (nixos-rebuild): use nixpkgs.config option
4545 config =
4646 let
47− toPath = builtins.toPath;
48− getEnv = builtins.getEnv;
49− pathExists = name:
50− builtins.pathExists (toPath name);
47+ inherit (builtins) getEnv pathExists;
5148
5249 configFile = getEnv "NIXPKGS_CONFIG";
5350 homeDir = getEnv "HOME";
@@ -55,8 +52,8 @@ let
5552
5653 configExpr =
5754 if config_ != null then config_
58− else if configFile != "" && pathExists configFile then import (toPath configFile)
59− else if homeDir != "" && pathExists configFile2 then import (toPath configFile2)
55+ else if configFile != "" && pathExists configFile then import configFile
56+ else if homeDir != "" && pathExists configFile2 then import configFile2
6057 else {};
6158
6259 in