60 lines
2.6 KiB
Diff
60 lines
2.6 KiB
Diff
diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc
|
|
index 5d1723886..4f2e4f5db 100644
|
|
--- a/src/libstore/profiles.cc
|
|
+++ b/src/libstore/profiles.cc
|
|
@@ -250,13 +250,6 @@ Path getDefaultProfile()
|
|
{
|
|
Path profileLink = getHome() + "/.nix-profile";
|
|
try {
|
|
- if (!pathExists(profileLink)) {
|
|
- replaceSymlink(
|
|
- getuid() == 0
|
|
- ? settings.nixStateDir + "/profiles/default"
|
|
- : fmt("%s/profiles/per-user/%s/profile", settings.nixStateDir, getUserName()),
|
|
- 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 e04954d45..5649bd01a 100644
|
|
--- a/src/nix-env/nix-env.cc
|
|
+++ b/src/nix-env/nix-env.cc
|
|
@@ -1336,19 +1336,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;
|
|
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
|
|
index f27331534..386a664d9 100644
|
|
--- a/src/libexpr/primops.cc
|
|
+++ b/src/libexpr/primops.cc
|
|
@@ -1862,9 +1862,9 @@ static void addPath(
|
|
if (state.store->isInStore(path)) {
|
|
auto [storePath, subPath] = state.store->toStorePath(path);
|
|
auto info = state.store->queryPathInfo(storePath);
|
|
- if (!info->references.empty())
|
|
- throw EvalError("store path '%s' is not allowed to have references",
|
|
- state.store->printStorePath(storePath));
|
|
+ // if (!info->references.empty())
|
|
+ // throw EvalError("store path '%s' is not allowed to have references",
|
|
+ // state.store->printStorePath(storePath));
|
|
path = state.store->toRealPath(storePath) + subPath;
|
|
}
|
|
|