mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
Keep the default profile the same
It's used as the “system” profile in a bunch of places, so better not touch it. Besides, it doesn't hurt to keep it since it's owned by root any way, so it doesn't have the `chown` problem that the user profiles had and that led to wanting to move them on the client-side.
This commit is contained in:
parent
c80621dbac
commit
6bdf4edb77
@ -292,7 +292,10 @@ Path getDefaultProfile()
|
||||
{
|
||||
Path profileLink = getHome() + "/.nix-profile";
|
||||
try {
|
||||
auto profile = profilesDir() + "/profile";
|
||||
auto profile =
|
||||
getuid() == 0
|
||||
? settings.nixStateDir + "/profiles/default"
|
||||
: profilesDir() + "/profile";
|
||||
if (!pathExists(profileLink)) {
|
||||
replaceSymlink(profile, profileLink);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user