aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 3a012638b..aa7ada37d 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -1403,11 +1403,11 @@ static int main_nix_env(int argc, char * * argv)
try {
createDirs(globals.instSource.nixExprPath);
replaceSymlink(
- fmt("%s/profiles/per-user/%s/channels", settings.nixStateDir, getUserName()),
+ defaultChannelsDir(),
globals.instSource.nixExprPath + "/channels");
if (getuid() != 0)
replaceSymlink(
- fmt("%s/profiles/per-user/root/channels", settings.nixStateDir),
+ rootChannelsDir(),
globals.instSource.nixExprPath + "/channels_root");
} catch (Error &) { }
}