From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Prikler Subject: Re: Collect guix profiles in single directory. Date: Fri, 31 Jan 2020 10:18:15 +0100 Message-ID: References: <87blrefavb.fsf@gnu.org> <34307ca779925da741af20fa57497c8e13eae7d6.camel@student.tugraz.at> <87tv56av8o.fsf@ambrevar.xyz> <87wo98pwup.fsf@ambrevar.xyz> <97bd40c8513d323e11e63e1083a8bf6c33940840.camel@student.tugraz.at> <87imksoy2z.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:32831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixSRM-0007NN-Lh for guix-devel@gnu.org; Fri, 31 Jan 2020 04:18:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixSRH-0000I2-Or for guix-devel@gnu.org; Fri, 31 Jan 2020 04:18:14 -0500 In-Reply-To: <87imksoy2z.fsf@ambrevar.xyz> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt , Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org Hi Pierre, Am Freitag, den 31.01.2020, 08:59 +0100 schrieb Pierre Neidhardt: > Hi Leo, > > About ordering: > > 1. ~/.config/guix/current is special in that it's the channel of Guix > and it's installed by "guix pull" unlike other channels. Thus I > don't > think it belongs to GUIX_PROFILE_DIR. That said, we could introduce > another environment variable for those who want to move it somewhere > else. The whole point of this operation was to put everything into one directory, including profiles managed by `guix pull` rather than `guix package` -- see the subject line and the initial post. In the first place, current is not even some piece of configuration that would warrant putting it into $XDG_CONFIG_DIR or requiring any other variable, that ends with _CONFIG_DIR. Conceptually it is a profile like any other. > 2. Indeed profiles should be loaded in a well known order. I suggest > to > follow the C alphabetical order. Should "default" be sourced before > the > rest? Maybe not. I suggest we leave it to the user at this point. If we use reverse alphabetical order, we'll have [z-default), default, channels, (channels-a], which would mimic the current behaviour. This is also beneficial when people start prefixing their profiles with numbers to get deterministic ordering. If p00-foo is loaded after p01- bar, the paths it sets will be so that p00-foo appears first. > > - When GUIX_PROFILE_DIR is set, use GUIX_PROFILE_DIR/channels in > > `guix > > pull', falling back to ~/.config/guix/current. > > As suggested above, "guix pull" is quite special. I don't think we > should put it in GUIX_PROFILE_DIR/channels. As discussed above. > > - When GUIX_PROFILE_DIR is set, read channels from > > $GUIX_PROFILE_DIR/channels.scm, falling back to > > ~/.config/guix/channels.scm. > > No strong opinion here, we could also leave it to > ~/.config/guix/channels.scm. It's a configuration file after all. Fair enough, but I'd also like $GUIX_PROFILE_DIR to be a place where users can store their manifests and other specifications. Hence loading channels.scm from there first (if it exists) sounds like a good idea. > Maybe not, since this might raise confusions, e.g. what happens when > you > type `-P my-profile` and there is a "my-profile" directory in the > current directory? My bad, I forgot, that lowercase `-p` will still exist. Now that I think about it, is -P my-profile really that much better than -p $GUIX_PROFILE_DIR/my-profile? I personally believe explicit to be better here. Regards, Leo