43 lines
1.7 KiB
Diff
Raw Normal View History

2021-09-15 23:17:00 +03:00
diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc
2023-02-11 01:19:24 +03:00
index b202351ce..944a90702 100644
2021-09-15 23:17:00 +03:00
--- a/src/libstore/profiles.cc
+++ b/src/libstore/profiles.cc
2023-02-11 01:19:24 +03:00
@@ -292,13 +292,6 @@ Path getDefaultProfile()
2021-09-15 23:17:00 +03:00
{
Path profileLink = getHome() + "/.nix-profile";
try {
2023-02-11 01:19:24 +03:00
- auto profile =
- getuid() == 0
- ? settings.nixStateDir + "/profiles/default"
- : profilesDir() + "/profile";
2021-09-15 23:17:00 +03:00
- if (!pathExists(profileLink)) {
2023-02-11 01:19:24 +03:00
- replaceSymlink(profile, profileLink);
2021-09-15 23:17:00 +03:00
- }
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
2023-02-11 01:19:24 +03:00
index 406e548c0..e9004efee 100644
2021-09-15 23:17:00 +03:00
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
2023-02-11 01:19:24 +03:00
@@ -1396,19 +1396,6 @@ static int main_nix_env(int argc, char * * argv)
2021-09-15 23:17:00 +03:00
globals.instSource.nixExprPath = getHome() + "/.nix-defexpr";
globals.instSource.systemFilter = "*";
2023-02-11 01:19:24 +03:00
2021-09-15 23:17:00 +03:00
- 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;
2023-02-11 01:19:24 +03:00
globals.removeAll = false;