top-level: builtins.toPath no longer needed
This commit is contained in:
parent
20a8349d62
commit
98b9403a22
@ -44,10 +44,7 @@ let
|
||||
# for NIXOS (nixos-rebuild): use nixpkgs.config option
|
||||
config =
|
||||
let
|
||||
toPath = builtins.toPath;
|
||||
getEnv = builtins.getEnv;
|
||||
pathExists = name:
|
||||
builtins.pathExists (toPath name);
|
||||
inherit (builtins) getEnv pathExists;
|
||||
|
||||
configFile = getEnv "NIXPKGS_CONFIG";
|
||||
homeDir = getEnv "HOME";
|
||||
@ -55,8 +52,8 @@ let
|
||||
|
||||
configExpr =
|
||||
if config_ != null then config_
|
||||
else if configFile != "" && pathExists configFile then import (toPath configFile)
|
||||
else if homeDir != "" && pathExists configFile2 then import (toPath configFile2)
|
||||
else if configFile != "" && pathExists configFile then import configFile
|
||||
else if homeDir != "" && pathExists configFile2 then import configFile2
|
||||
else {};
|
||||
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user