unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Gottfried <gottfried@posteo.de>
To: Gary Johnson <lambdatronic@disroot.org>
Cc: help-guix@gnu.org
Subject: Re: Help-Guix Digest, Vol 88, Issue 4
Date: Tue,  7 Mar 2023 16:15:03 +0000	[thread overview]
Message-ID: <951e1a3f-5b70-b3c9-0fb8-7e324528d88d@posteo.de> (raw)
In-Reply-To: <87ilfe4p4q.fsf@disroot.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 5937 bytes --]

Hi,

1.
> GUIX_PROFILE="~/guix-profiles/emacs/emacs"
>> . "$GUIX_PROFILE"/etc/profile

As unexperienced in Scheme I am asking
  if the second line beginning with the "dot" is separated for easier 
read, but everything is one command?

2.
I have got already many packages in my profile and
updating takes a long time.

So I am thinking of splitting of some packages to create several 
profiles and AFAIU updating with
sudo guix system reconfigure /etc/config.scm
it will take less time because it will not automatically update all my 
profiles at once. (Is this right?)

3.
I was creating a profile with "Musescore"
and a profile with "Emacs".
I want to create still other profiles.

4.
Now I still don’t understand everything concerning profiles.
If I enable all profiles at login time
how will it work?
How can I enter the different profiles?
How do I know in which profile I am and to switch to an other?

e.g. I have emacs installed in my main profile.
I have got a manifest with emacs with additional emacs packages.
When entering this separate profile with guix shell
I get to  guix shell (env)...
but when I entered:  "emacs"
it opened emacs with the package "Icicles" which I don’t have in my 
emacs manifest, only in my emacs in the main profile.
So I concluded, it is the emacs in my main profile and not the one in my 
emacs manifest profile.
How are both connected? Are they separated? (I understood it like this, 
because it is a different profile). But this emacs manifest doesn’t have 
a init.el file etc.
May be profiles are not completely separated in Guix like I understood 
until now.

My aim was to have a separate emacs profile then I can delete the emacs 
in my main profile. But If the separate Emacs profile uses the init.el 
file etc. from the emacs in my main profile, I can’t delete this emacs.
So how are both connected?

I wanted to create several profiles with certain packages
and then delete/uninstall those packages in my main profile to get less 
packages.
But I don’t know if this works, because it’s unclear to me how they are 
connected.

I hope you understand me
( I can’t describe my problems in terms of a developer’s language)

Kind regards,

Gottfried



Am 06.03.23 um 02:35 schrieb Gary Johnson:
> Gottfried <gottfried@posteo.de> writes:
> 
>> thank you very much for sharing your Emacs manifest.
>>
>> I tried to do what you said.
>>
>> I created a manifest for Emacs only.
>>
>> After doing it, Guix asked me to set the PATH.
>>
>> I did it and after that this Emacs Manifest changed my general profile.
>> It became my general profile.
>> I couldn’t use my other programmes any more.
>> So I had to do a rollback.
>>
>> 1. I don’t know what I did wrong.
> 
> You didn't do anything wrong. The command I provided will create the
> next generation of your profile from the manifest file. Any packages not
> included in the manifest will be missing from that generation. It sounds
> like that's what happened in this case. If you want other packages
> installed into your profile as well, you could add them to your manifest
> file.
> 
>> 2. AFAIK to create a manifest is not yet a profile.
>> I have to create a manifest and then to create a profile with it.
>> Am I right?
> 
> Correct. A manifest is a file of Scheme code that lists the packages
> which you would like to install into a profile (or environment).
> 
> (Well, technically the manifest is the Scheme object produced by that
> code, but in practice we can think of the file as the manifest with
> little loss of information.)
> 
> You can create a temporary environment which contains the packages in a
> manifest with this command:
> 
> ```
> guix shell -m manifest.scm
> ```
> 
> To make this environment persistent, you have to create a profile like
> so:
> 
> ```
> guix package -m manifest.scm
> ```
> 
>> 2. If so, after creating a manifest, which commands do I have to use to
>> make it a separate profile?
>>
>> Probably to generate a manifest and make it a separate profile goes
>> together, but I don’t know how to do it.
> 
> Note that `guix package` will create a new profile generation in your
> user profile by default. To override this, you can specify a different
> profile that you want the generation added to instead:
> 
> ```
> guix package -m manifest.scm -p $YOUR_NEW_PROFILE_DIR
> ```
> 
> One of the perhaps slightly odd things to remember with this command is
> that $YOUR_NEW_PROFILE_DIR should repeat its final directory name twice.
> 
> Here's an example for creating a new emacs profile. In this setup, we
> assume that you have the following directory structure in your home
> directory:
> 
> ~/
> ├── guix-manifests/
> │   ├── emacs.scm
> ├── guix-profiles/
> │   ├── emacs/
> 
> You would issue the following command to install a new profile
> generation under the ~/guix-profiles/emacs/ directory, containing all
> the packages defined in ~/guix-manifests/emacs.scm:
> 
> ```
> guix package -m ~/guix-manifests/emacs.scm -p ~/guix-profiles/emacs/emacs
> ```
> 
> To activate this profile (thereby making its contents available in your
> shell environment), you would issue these commands:
> 
> ```
> GUIX_PROFILE="~/guix-profiles/emacs/emacs"
> . "$GUIX_PROFILE"/etc/profile
> export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
> export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
> ```
> 
> For ease of use, you should place this code in your ~/.bash_profile. In
> this way, the profile will be activated at login time (for example,
> through GDM) and will then be available in all of your shells as well as
> any other programs that respect the environment variables you set (e.g.,
> emacs).
> 
> Have fun and happy hacking!
>    ~Gary
> 

-- 

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2023-03-07 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.81.1677776445.12246.help-guix@gnu.org>
2023-03-05  8:44 ` Help-Guix Digest, Vol 88, Issue 4 Gottfried
2023-03-05 10:07   ` Wojtek Kosior via
2023-03-05 13:27     ` Gottfried
2023-03-06  1:35   ` Gary Johnson
2023-03-07 16:15     ` Gottfried [this message]
2023-03-08  1:58       ` 宋文武
2023-03-20  7:04     ` Gottfried
2023-03-21 14:42       ` Gary Johnson
2023-04-07 13:02         ` Gottfried
2023-04-07 14:31           ` I am sorry " Gottfried
2023-04-15  2:08             ` Tracker

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=951e1a3f-5b70-b3c9-0fb8-7e324528d88d@posteo.de \
    --to=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    --cc=lambdatronic@disroot.org \
    /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).