[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question: Why my system has so many shells.scm files?

From: Julien Lepiller
Subject: Re: Newbie question: Why my system has so many shells.scm files?
Date: Sun, 05 Mar 2023 08:06:59 +0100
User-agent: K-9 Mail for Android

Another possibility is to use guix gc -R `readlink -f /path/to/a/profile`. Note 
that you have multiple profiles (system, user, pull, maybe home).

The command lists all live paths under a given store path. In this case, all 
that is accessible to the profile you asked for. It's granularity is the store 
path, not exact files, so even a store path is live and has a shells.scm in it, 
doesn't mean it's actually used.

Also, the shells.scm you found can be split in two categories. There are two 
different guile modules:

(gnu packages shells) has packages related to shells (bash, zsh, …)
(gnu home services shells) has service definitions for guix home that are 
related to shells (creating a bashrc for instance)

Some of the store paths you mention seem to be sources that could probably be 
garbage collected.

Le 5 mars 2023 02:04:45 GMT+01:00, "宋文武" <> a écrit :
>Rodrigo Morales <> writes:
>> Table of Contents
>> _________________
>> 1. The context
>> 2. The question
>> 1 The context
>> =============
>>   Newbie user here. I'm curious about how `home-bash-configuration'
>>   works, so I wanted to jump to its definition. I know that one way of
>>   doing this is cloning the Guix repository and executing grep to search
>>   that string. In fact, I did this and found it in
>>   `gnu/home/services/shells.scm'.
>>   Using common sense, I knew that that file also existed in my system,
>>   so I was wondering how I could have accomplished the same objective
>>   without having to download the Git repository, just in case some day I
>>   don't have internet connection
>>   ,----
>>   | locate shells.scm | grep '/gnu/store'
>>   `----
>> [...]
>> 2 The question
>> ==============
>>   How to know which of these files is currently being used by my
>>   system?  I'm sure not all of them are being used. I'm somewhat
>>   familiar with how generations work, but in other words, I'd like to
>>   know how to determine which of these files is the one that is being
>>   used by the current generation.
>First to find out what files are currently going to be used the system:
>  $ guix repl
>  > %load-path
>I got:
>$1 = 
> "/gnu/store/qbqdkziw7222077fn4z2x5n91185ivis-guile-3.0.9/share/guile/3.0" 
>In the first directory, it has:
> /gnu/store/sg5mf194lisl59b1bm3a7x6llf3vvhlv-guix-module-union/share/guile/site/3.0/gnu/home/services/shells.scm
>These scm files are guile modules, which will be used by the time 'guix' run.
>And to find out what the current generation are using, first you need to
>find out what guix version(s) being used.
>For system profile, /run/current-system/provenace or
>/run/current-system/channels.scm has the version (guix commit) info.
>For user profile, ~/.guix-profile/manifest have it in the provenance property.
>Then given the commit, how to get the files?
>If you 'guix pull' before as I did, it can be:
>cd ~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq
>git checkout -f ${COMMIT}
>Or 'guix pull --commit ${COMMIT}', or git clone a new guix repository...
>Hope this helps!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]