mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-30 01:26:15 +02:00
nix-channel: Restore the old root channels directory
This commit is contained in:
parent
918ca8b3a3
commit
82bd9535dd
1 changed files with 7 additions and 1 deletions
|
@ -168,7 +168,13 @@ static int main_nix_channel(int argc, char ** argv)
|
||||||
nixDefExpr = settings.useXDGBaseDirectories ? createNixStateDir() + "/defexpr" : home + "/.nix-defexpr";
|
nixDefExpr = settings.useXDGBaseDirectories ? createNixStateDir() + "/defexpr" : home + "/.nix-defexpr";
|
||||||
|
|
||||||
// Figure out the name of the channels profile.
|
// Figure out the name of the channels profile.
|
||||||
profile = profilesDir() + "/channels";
|
// For backwards-compatibility, install the root channels under
|
||||||
|
// a custom location, as these are also used as "global" channeles, and
|
||||||
|
// their location is hardcoded in a number of places.
|
||||||
|
profile = getuid() == 0
|
||||||
|
? settings.nixStateDir + "/profiles/per-user/root/channels"
|
||||||
|
: profilesDir() + "/channels";
|
||||||
|
createDirs(dirOf(profile));
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
cNone,
|
cNone,
|
||||||
|
|
Loading…
Reference in a new issue