From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eE1SAYqDVGEWvAAAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 17:17:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CLl+OImDVGHHGgAAB5/wlQ (envelope-from ) for ; Wed, 29 Sep 2021 15:17:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9F697A4BF for ; Wed, 29 Sep 2021 17:17:26 +0200 (CEST) Received: from localhost ([::1]:40206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVbKn-0002xx-9i for larch@yhetil.org; Wed, 29 Sep 2021 11:17:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVbIx-0001gk-M7 for help-guix@gnu.org; Wed, 29 Sep 2021 11:15:35 -0400 Received: from lepiller.eu ([89.234.186.109]:57856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVbIu-0000Pd-EX for help-guix@gnu.org; Wed, 29 Sep 2021 11:15:31 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 0577f236; Wed, 29 Sep 2021 15:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=sjxdsgS+Fo6W 5am0uHgtiMm9ZnamrzgDQ1yFMy3A8VU=; b=FBjwfhOmX3F3RT0m1d2MClxS5OV/ c1PxkAPaCEqAziJl1HJVhRcxphh+q+CbOKm+3nq2qt+QfUohESzNMN/Lo5uQ3ImZ SsMUDN/g0M6wm1e+cNr/8Gxmfsr45RXOjiCec78Gwj01wXRDxE1v918iFj3W1KN7 rdiIE+jZeaj7y1SyxNuKuOHr6FYHQ7J19Yp8+XmNOGH/cTkKedpjF7mIb2/m2CvI 2Spci3sF0fUE0s0BoL3Ge1N5ovTdWdbJAzHErmvB1GixW0I9ghwCL5Ft1RUGP/sd FsojOVdqHWjpp/oT82A1whqs3Z71/BlrbQXugEwGz4Gld6HbG/8s9t7n2w== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 7fc6f9bc (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 29 Sep 2021 15:15:20 +0000 (UTC) Date: Wed, 29 Sep 2021 11:15:13 -0400 From: Julien Lepiller To: help-guix@gnu.org, Kenan Toker Subject: Re: Profile sourcing and $GUIX_PROFILE when using guix home User-Agent: K-9 Mail for Android In-Reply-To: <40125902-9729-a0e2-c0e5-514e06c0fe69@kdtsh.net> References: <40125902-9729-a0e2-c0e5-514e06c0fe69@kdtsh.net> Message-ID: <8E8F363C-9043-4CC0-B07C-8F0C072157A1@lepiller.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=89.234.186.109; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632928648; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=sjxdsgS+Fo6W5am0uHgtiMm9ZnamrzgDQ1yFMy3A8VU=; b=hX/4WQIFpBOCOxYrxJhLiVNdDYWlhqvAyt4IowOb922ogWxAsVKTjZD0lx864bkeJSKQl8 dnZ/sE8cjVvvr/4CcR0MDKLZ4z8HuVg4JZ8bDihPdvcg3/cUHAR+TX9w3cILfsF80Zmcuy 2zE3UA+Au1HH81R70yfhpIxZm9sVnbScugjOPEPy9DoXdxwK6fEmXinVeUPg+3l9rWVAGZ qJhaWCIpUoVBbOT7BdnPuo5Q/Nxl7NS41FkghSY4DCeBe5EhdQVJMHqHntCjuTw6EthkpC tfJFcNiZumHBprdQtQRxv6HJJ/bXkBfbAL9tyS8ZxnmdyIoXbVbBJbHdWiYUgw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632928648; a=rsa-sha256; cv=none; b=HM/TDPlyECgmiMIC9o5LptGMs33ZDouyoy1gVe4OtcDGx+k3CHIU24VAHWZ3JSD9qzQGyt ME/47CFRqNDrDdvB2LTnf6kNnIOTzzkH9sZuNyvbBRlkMs4uZOzSn+GeFVYfLZoKT3OIgh /WCdlsK8ucLMmlt3AFrS2/2dLNpYe7lWLX1GYx6z6MmEO46pFqmCkSmEBewEDJYOBAePH/ xHNpwkxLviTi6+pbhp9NFDTKPsylKhFxb1qPDRmhm/yR3MjYShbr5Trd6F4vxVZv32DVde 9no98zey/8d9Y6K0u+8430fRvFcjRRTIwrmed0hu8J6QhjS/Y+fdZAlmZto/Kw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=FBjwfhOm; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=FBjwfhOm; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 9F697A4BF X-Spam-Score: -2.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: Fm73vuRMpBCY Le 29 septembre 2021 09:10:44 GMT-04:00, Kenan Toker a = =C3=A9crit=C2=A0: >Hello wonderful Guix users and developers! > >I am looking for some help understanding fundamental concepts in Guix=2E= =20 >In particular, I want to better understand how $GUIX_PROFILE works, and= =20 >how profiles are sourced when I boot, login, etc=2E I am using Guix Syste= m=20 >and generally keep up-to-date with the main branch, usually running a=20 >guix pull every other day before I make any configuration changes or=20 >install new packages=2E > >I have recently started using guix home, and my $GUIX_PROFILE is=20 >automatically set to: > =C2=A0 =C2=A0 ~/=2Eguix-home/profile >This is currently a symlink to the directory: > =C2=A0 =C2=A0 /gnu/store/708xnkkd86xf4nx9mmf8szpwi4yd9ms2-profile/ > >I also have a symlink in my $HOME called ~/=2Eguix-profile, which links t= o: > =C2=A0 =C2=A0 /var/guix/profiles/per-user/me/guix-profile >This links to the symlink: > =C2=A0 =C2=A0 /var/guix/profiles/per-user/me/guix-profile-n-link >Which in turn currently links to the directory: > =C2=A0 =C2=A0 /gnu/store/3mjlciy8fywyvajcxy76gy3dscp1bmns-profile/ > >What I am wondering is: > =C2=A0 =C2=A0 1=2E Where is $GUIX_PROFILE set for my user, and how has t= his changed=20 >since using guix home? > =C2=A0 =C2=A0 2=2E ~/=2Eguix-profile/etc/profile seems to have been sour= ced at some=20 >point between booting, logging into my account, and opening an=20 >interative shell, because all my packages are present when I run `guix=20 >package -I`; I also have all the packages I expect in Gnome Shell=2E=20 >How/when was ~/=2Eguix-profile/etc/profile sourced if it is not set to=20 >$GUIX_PROFILE? > >Slightly related: before I started using guix home, I found that my=20 >$GUIX_PROFILE would sometimes be set to ~/=2Econfig/guix/current, which= =20 >links to: > =C2=A0 =C2=A0 /var/guix/profiles/per-user/me/current-guix >This links to the symlink: > =C2=A0 =C2=A0 /var/guix/profiles/per-user/me/current-guix-n-link >Which in turn currently links to the directory: > =C2=A0 =C2=A0 /gnu/store/n6syypzqx7cfr7ypd56ww04313xh888k-profile/ > >(This behaviour, where $GUIX_PROFILE was ~/=2Econfig/guix/current instead= =20 >of ~/=2Eguix-profile, did not always happen - I have never found a clear= =20 >pattern as to why it happened when it did=2E I did find that it would=20 >correlate with unexpected behaviour like my laptop not suspending on lid= =20 >close, but I have never determined the exact cause of this so it might=20 >not be related=2E) > >I understand that ~/=2Econfig/guix/current is a profile containing the=20 >current version of Guix (along with the channels I use), and that=20 >~/=2Eguix-profile is a profile containing packages installed to the=20 >default profile=2E On this, I am wondering > =C2=A0 =C2=A0 1=2E How it is that both ~/=2Econfig/guix/current/etc/prof= ile and=20 >~/=2Eguix-profile/etc/profile are sourced at some point before or during= =20 >login? > =C2=A0 =C2=A0 2=2E Why it was that $GUIX_PROFILE would sometimes be set = to=20 >~/=2Econfig/guix/current (before I started using guix home)? > >Thanks a lot everyone, >Kenan > GUIX_PROFILE is not used by guix ittelf, it's only a convenience variable = that's set just before sourcing said profile=2E On a foreign distro, you'll find the code that loads your profile in /etc/= profile=2Ed/guix=2Esh On the guix system, it's /etc/profile directly=2E In addition, you might have some code in ~/=2Eprofile or ~/=2Ebash_profile= =2E As you can see, GUIX_PROFILE's value changes multiple times, which explain= s why multiple profiles are loaded in the environment=2E