unofficial mirror of guix-science@gnu.org 
 help / color / mirror / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Etienne B. Roesch" <etienne.roesch@gmail.com>,
	Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: Felix Lechner <felix.lechner@lease-up.com>,
	help-guix@gnu.org, guix-science@gnu.org
Subject: Re: guix on nfs based systems
Date: Thu, 15 Feb 2024 17:14:13 +0100	[thread overview]
Message-ID: <87frxt7lii.fsf@gmail.com> (raw)
In-Reply-To: <CAPX-MzBchrjepXk3haNaUPUpxiXfMf3gcvsE_mRnAjdrthEUog@mail.gmail.com>

Hi Étienne,

I am very late to the party. :-)

Well, there is a discussion about “guix shell”, “profile” and “guix
time-machine”.  Since these concepts can appear as first as alien, let
me try a quick summary of my understanding.

 + “guix shell“ creates a temporary profile;
 + “guix time-machine” creates a temporary revision.

For the plumbing details, both live under “~/.cache/guix/” and all is
managed automatically.

An example:

    $ guix package -m manifest.smc -p /tmp/foo
    $ GUIX_PROFILE="/tmp/foo"
    $ . "$GUIX_PROFILE/etc/profile"

Instead,

    $ guix shell -m manifest.scm

somehow does the same but the user does not manually manage the profile
and activate it.  This profile is automatically and transparently
managed.

Now, you might run “guix pull”, so there is a chance that the next “guix
shell” will not build the same underlying profile.  That’s where “guix
time-machine” comes in. :-)

You “freeze” one revision with “guix describe -f channels >
channels.scm” then run

    guix time-machine -C channels.scm -- shell manifest.scm

It is costly the first run, then all is cached.  Somehow, this command
could be seen as “conda env activate“ coupled to some lock stuff.

All that said, one thing to know: when is the cache cleaned up?

There is a ’last-expiry-cleanup’ that tracks and does the job.
Basically, you do not have to worry about this ~/.cache/guix/.  All is
automatically managed.

When the user runs ‘guix gc’ or the sysadmin also ’guix gc’ then this
cache is cleaned up if it is too old.

Now the question is about what does it mean “too old”?  Although “guix
time-machine -C channels.scm -- shell -m manifest.scm” will rebuild all
if required, it can be at the wrong moment.  Therefore, for some very
specific environment that I want to protect from “guix gc”, I create a
profile for them.  Note it is rare and thanks many improvements, it
becomes more and more useless.

Obviously, if “guix gc” is never run, the manual management of “profile”
is fully useless, IMHO.


Cheers,
simon


      parent reply	other threads:[~2024-02-15 17:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPX-MzA5P1A8u8QbR-g-Lx4gONQ+o7mO1TZzhZ3UHh=KdUxhvw@mail.gmail.com>
2023-11-23  6:32 ` guix on nfs based systems Efraim Flashner
2023-11-23  9:41   ` Etienne B. Roesch
2023-11-26  7:33     ` Efraim Flashner
2023-12-14 14:41     ` Ricardo Wurmus
2023-11-23 13:03   ` Felix Lechner via
2023-11-23 13:03     ` Felix Lechner via Guix-Science
2023-11-24 18:08     ` Etienne B. Roesch
2023-11-26  7:36       ` Efraim Flashner
2023-12-13 10:17         ` Etienne B. Roesch
2023-12-14 14:46           ` Ricardo Wurmus
2023-12-14 15:28             ` Etienne B. Roesch
2023-12-14 15:33               ` Pierre-Antoine Bouttier
2023-12-14 15:33                 ` Pierre-Antoine Bouttier
2023-12-14 15:57                 ` Etienne B. Roesch
2023-12-14 19:35               ` [ext] " Ricardo Wurmus
2024-02-15 16:14               ` Simon Tournier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frxt7lii.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=etienne.roesch@gmail.com \
    --cc=felix.lechner@lease-up.com \
    --cc=guix-science@gnu.org \
    --cc=help-guix@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).