hi Arnaud,

Thanks a lot for your clear answer!

    Esteban,
        

On 2026-07-31 10:44:33, Arnaud Daby-Seesaram wrote:
> Hi,
> 
> (Sorry for the duplicate email, I forgot to CC help-guix.)
> 
> 
> Esteban Venialgo <[email protected]> writes:
> 
> > [...] I'd like to understand a bit better the file system
> > structure. Is there any guide that explains, for instance, what is
> > inside /run/current-system, or /gnu/store, or /var/guix?
> 
> I am not aware of such a guide, but there might be a Guix Days talk
> about it.  In any case, here is a brief answer.  It might be incomplete,
> but hopefully contains interesting elements.  Feel free to ask follow-up
> questions that I (or others) can answer.
> 
> 
> On /gnu/store:
> ``````````````
> 
> Guix users can¹ use declarative programming to describe the system they
> expect at different levels: system-wide configuration [1], user-wide
> configuration [2], profiles (collection of packages) [3], individual
> Guix packages [4], ...
> 
> ¹: other users may use the command-line for some of these operations
>    (e.g., install/update packages) without editing Scheme files
> 
> From these declarations, Guix builds files and directories, located in
> /gnu/store/.  These correspond to, for example, package contents
> (binaries, libraries, images, etc.).  Only Guix should add to this
> directory, which is read-only for normal users.
> 
> For example, running `guix build hello` in a terminal prints
> `/gnu/store/ab584kfyc7pymc1cmdrkwzz3lwv86yf6-hello-2.12.3`.  Inside this
> directory, you will find files pertaining to the GNU Hello package.
> 
> The first part of the name can be ignored and is derived from the
> package declaration and its dependencies.  This way, if a dependency
> changes, so does this prefix.
> 
> Note: Every file in /gnu/store should be reproducible.
> 
> 
> On /run/current-system:
> ```````````````````````
> 
> This is a symlink to your current system (by default configured via
> /etc/config.scm during the installation IIRC).
> 
> It contains:
> - files/packages available system-wide (in profile),
> - how to "activate" this system generation (startup files),
> - the kernel and boot-related files,
> - information to reproduce this directory: channels.scm,
>   configuration.scm, and provenance.
> 
> You can run `ls -l /run/current-system` to see its path in /gnu/store.
> 
> 
> Note: Home configurations are similar to system configurations.  Running
>       `guix home build /path/to/config/file.scm` prints a directory path
>       (/gnu/store/...-home).  Inside, one can find files to install in
>       $HOME (in files/), configuration.scm, a profile, ...
> 
> 
> On /var/guix:
> `````````````
> 
> This directory contains stateful information used by Guix and which is
> preserved on reboot.  For example, /var/guix/profiles/ is used to make
> sure that `guix gc` does not remove files currently in-use.
> 
> 
> 
> Documentation links below can be visited (without Emacs) by:
> - executing `info "(guix)..."` in the terminal, or
> - finding the chapters in the online manual, available at
>   https://guix.gnu.org/manual/devel/en/html_node/
> 
> [1] See (info "(guix)Using the Configuration System")
> [2] See (info "(guix)Declaring the Home Environment")
> [3] See (info "(guix)Writing Manifests")
> [4] See (info "(guix)Defining Packages")
> 
> 
> HTH!
> 
> -- 
> Arnaud



Reply via email to