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
1 changed files with 4 additions and 1 deletions
|
@ -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 a new issue