1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Allow setting the profile location using $NIX_PROFILE

Fixes #69.
This commit is contained in:
Eelco Dolstra 2012-12-12 16:01:46 +01:00
parent 3ad53e43c8
commit 9fa12fc201
2 changed files with 16 additions and 4 deletions

View file

@ -1350,6 +1350,9 @@ void run(Strings args)
if (!op) throw UsageError("no operation specified");
if (globals.profile == "")
globals.profile = getEnv("NIX_PROFILE", "");
if (globals.profile == "") {
Path profileLink = getHomeDir() + "/.nix-profile";
globals.profile = pathExists(profileLink)