diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index b202351ce..944a90702 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -292,13 +292,6 @@ Path getDefaultProfile() { Path profileLink = getHome() + "/.nix-profile"; try { - auto profile = - getuid() == 0 - ? settings.nixStateDir + "/profiles/default" - : profilesDir() + "/profile"; - if (!pathExists(profileLink)) { - replaceSymlink(profile, profileLink); - } return absPath(readLink(profileLink), dirOf(profileLink)); } catch (Error &) { return profileLink; diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index 406e548c0..e9004efee 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -1396,19 +1396,6 @@ static int main_nix_env(int argc, char * * argv) globals.instSource.nixExprPath = getHome() + "/.nix-defexpr"; globals.instSource.systemFilter = "*"; - if (!pathExists(globals.instSource.nixExprPath)) { - try { - createDirs(globals.instSource.nixExprPath); - replaceSymlink( - fmt("%s/profiles/per-user/%s/channels", settings.nixStateDir, getUserName()), - globals.instSource.nixExprPath + "/channels"); - if (getuid() != 0) - replaceSymlink( - fmt("%s/profiles/per-user/root/channels", settings.nixStateDir), - globals.instSource.nixExprPath + "/channels_root"); - } catch (Error &) { } - } - globals.dryRun = false; globals.preserveInstalled = false; globals.removeAll = false;