Re: I am sorry Re: Help-Guix Digest, Vol 88, Issue 4
Gottfried writes: > Hi, > I am sorry, I mixed up two questions. > I was already one thought ahead. > > 1. Question about activating all profiles at login time > 2. Question updating all profiles at once. > > 1. > to avtivate all profiles at once > You wrote that it would be better to have only one package in one profil. > So I would have to use each package in a separate profil > > Musescore version 4.0.2 > and Musescore version 3.6.2 > are in different profiles, > so I guess it shouldn’t be a problem > What do you say? No, I think you misunderstood me. I have multiple packages in each of my profiles. This is fine. I would not make one profile per package. That seems like an abuse of the system somehow. The point of a profile is to create an environment in which a particular group of packages is installed. That's it. By default, each user on Guix System has one user profile. All packages that they install are placed into it. This is easy to manage. Some people (like myself) choose to create additional profiles. Many people do this in order to separate out a group of packages that they don't want installed (or upgraded) all the time. I do it because occasionally one of my packages breaks when I am upgrading my system. By splitting all of my packages up into a few different profiles by category, if one package fails to upgrade, then that profile doesn't upgrade, but all of my other profiles do. This allows me to install the newest software for everything outside of the broken profile. Then I focus on fixing the broken package and just upgrade the broken profile. Easy peasy. > 2. > To update all profiles at once > this is a different question, which I have to deal as well. > > Is there a way to do it? > > Is there a way to exclude the profile "Musik" because this profile I > have to upgrade with: > > guix package -p /home/gfp/Projekte/Musik/guix-profil -m > /home/gfp/Projekte/Musik/musik.scm > > or put Musescore 3.6.2 in a separate profil, > but still the question remains, that this profil should then not be > included in the update process. I believe I already provided you with the code for updating profiles and activating them, but here it is again for reference: ```update-profiles.sh #!/bin/sh GUIX_MANIFESTS=$HOME/sys/guix/manifests GUIX_PROFILES=$HOME/sys/guix/profiles for dir in $GUIX_PROFILES/* do name=$(basename "$dir") manifest=$GUIX_MANIFESTS/$name.scm profile=$dir/$name if [ -r $manifest ] then guix package --manifest="$manifest" --profile="$profile" fi unset profile unset manifest unset name done ``` ```activate-profiles.sh #!/bin/sh GUIX_PROFILES=$HOME/sys/guix/profiles for dir in $GUIX_PROFILES/* do name=$(basename "$dir") profile=$dir/$name if [ -f "$profile"/etc/profile ] then GUIX_PROFILE="$profile" . "$GUIX_PROFILE"/etc/profile export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH" export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH" fi unset profile unset name done ``` These scripts both loop over my manifests or profiles directories, running the upgrade or activate commands on each one. If you want to exclude a profile from being upgraded with this script, you can just take away its manifest's read permissons like so: ``` chmod -r $HOME/sys/guix/manifests/my-excluded-manifest.scm ``` Good luck, Gary -- GPG Key ID: C4FBEDBD Use `gpg --search-keys trac...@disroot.org' to find me Protect yourself from surveillance: https://emailselfdefense.fsf.org === () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments Why is HTML email a security nightmare? See https://useplaintext.email/ Please avoid sending me MS-Office attachments. See http://www.gnu.org/philosophy/no-word-attachments.html
I am sorry Re: Help-Guix Digest, Vol 88, Issue 4
Hi, I am sorry, I mixed up two questions. I was already one thought ahead. 1. Question about activating all profiles at login time 2. Question updating all profiles at once. 1. to avtivate all profiles at once You wrote that it would be better to have only one package in one profil. So I would have to use each package in a separate profil Musescore version 4.0.2 and Musescore version 3.6.2 are in different profiles, so I guess it shouldn’t be a problem What do you say? 2. To update all profiles at once this is a different question, which I have to deal as well. Is there a way to do it? Is there a way to exclude the profile "Musik" because this profile I have to upgrade with: guix package -p /home/gfp/Projekte/Musik/guix-profil -m /home/gfp/Projekte/Musik/musik.scm or put Musescore 3.6.2 in a separate profil, but still the question remains, that this profil should then not be included in the update process. Kind regards Gottfried Am 07.04.23 um 15:02 schrieb Gottfried: Hi, thanks a lot for sharing. This helps a lot. Without help of you and other hackers I would be lost. Those profiles I have got at the moment gfp@Tuxedo ~$ guix package --list-profiles /home/gfp/Projekte/Calibre/guix-profil with one package Calibre /home/gfp/Projekte/EmacsManifest/guix-profil with one package Emacs /home/gfp/Projekte/GNUCash/guix-profil, with 2 packages: Gnucash homebank /home/gfp/Projekte/Lilypond/guix-profil with many packages: lilypond, mercurial, timidity, frescobaldi, audio-to-midi, libsmf, ctrlr, muse-sequencer, fluidsynth, fluida-lv2, qsynth /home/gfp/Projekte/Musescore/guix-profil with one package Musescore 4.0.2 (current version) /home/gfp/Projekte/Musik/guix-profil with many packages: ardour, audacious, audacity, obs, vlc Musescore 3.6.2 (old version) /home/gfp/Projekte/Photoflare/guix-profil with 2 packages photoflare imagemagick (later converseen, which is now in a own profile: prefabricated by Csepp) /home/gfp/Projekte/Scribus/guix-profil with 2 packages: scribus, xournal /home/gfp/.config/guix/current /home/gfp/.guix-profile --- Note that this may lead to unpredictable behavior if you have the same package installed into multiple profiles that are all activated simultaneously. My recommendation is that you install each package into only one profile when using this approach. Now I have several problems with your approach. 1. I have more packages in one profile 2. Musescore has got an own profile, but Musescore 3.6.2 (old version) is in the profile "Musik" together with other packages, which should be upgraded. But Musescore 3.6.2 should not be upgraded. .. What can I now do, that I can activate multiple profiles at login time? Is there a way to exclude the profile "Musik" because this profile I have to upgrade with: guix package -p /home/gfp/Projekte/Musik/guix-profil -m /home/gfp/Projekte/Musik/musik.scm or to add it in the script Kind regards Gottfried Am 21.03.23 um 15:42 schrieb Gary Johnson: Gottfried writes: I have got now 3 profiles: EmacsManifest, Musescore, Musik in: home/gfp/Projekte/ Now I want them to be activated at login time. I still am not sure how to do that. To activate multiple profiles at login time, I created a shell script called `~/sys/scripts/activate-profiles.sh`, containing the following code: ``` #!/bin/sh GUIX_PROFILES=/home/gjohnson/sys/guix/profiles for dir in $GUIX_PROFILES/* do name=$(basename "$dir") profile=$dir/$name if [ -f "$profile"/etc/profile ] then GUIX_PROFILE="$profile" . "$GUIX_PROFILE"/etc/profile export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH" export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH" fi unset profile unset name done ``` Next, I added a `source` line to my `~/.bash_profile` file, which loads the `activate-profiles.sh` script when I enter a login shell. This script is also run when you log in to your graphical desktop session in Guix. ``` # Activate all of my Guix profiles source ~/sys/scripts/activate-profiles.sh ``` For you to use this approach, you should do the following: 1. Replace `GUIX_PROFILES=/home/gjohnson/sys/guix/profiles` in my `activate-profiles.sh` script with your profile directory, which seems to be this: `GUIX_PROFILES=/home/gfp/Projekte` 2. Place the `activate-profiles.sh` script somewhere in your home directory. 3. Replace `~/sys/scripts/activate-profiles.sh` in `~/.bash_profile` with the path to `activate-profiles.sh` on your
Re: Help-Guix Digest, Vol 88, Issue 4
Hi, thanks a lot for sharing. This helps a lot. Without help of you and other hackers I would be lost. Those profiles I have got at the moment gfp@Tuxedo ~$ guix package --list-profiles /home/gfp/Projekte/Calibre/guix-profil with one package Calibre /home/gfp/Projekte/EmacsManifest/guix-profil with one package Emacs /home/gfp/Projekte/GNUCash/guix-profil, with 2 packages: Gnucash homebank /home/gfp/Projekte/Lilypond/guix-profil with many packages: lilypond, mercurial, timidity, frescobaldi, audio-to-midi, libsmf, ctrlr, muse-sequencer, fluidsynth, fluida-lv2, qsynth /home/gfp/Projekte/Musescore/guix-profil with one package Musescore 4.0.2 (current version) /home/gfp/Projekte/Musik/guix-profil with many packages: ardour, audacious, audacity, obs, vlc Musescore 3.6.2 (old version) /home/gfp/Projekte/Photoflare/guix-profil with 2 packages photoflare imagemagick (later converseen, which is now in a own profile: prefabricated by Csepp) /home/gfp/Projekte/Scribus/guix-profil with 2 packages: scribus, xournal /home/gfp/.config/guix/current /home/gfp/.guix-profile --- Note that this may lead to unpredictable behavior if you have the same package installed into multiple profiles that are all activated simultaneously. My recommendation is that you install each package into only one profile when using this approach. Now I have several problems with your approach. 1. I have more packages in one profile 2. Musescore has got an own profile, but Musescore 3.6.2 (old version) is in the profile "Musik" together with other packages, which should be upgraded. But Musescore 3.6.2 should not be upgraded. .. What can I now do, that I can activate multiple profiles at login time? Is there a way to exclude the profile "Musik" because this profile I have to upgrade with: guix package -p /home/gfp/Projekte/Musik/guix-profil -m /home/gfp/Projekte/Musik/musik.scm or to add it in the script Kind regards Gottfried Am 21.03.23 um 15:42 schrieb Gary Johnson: Gottfried writes: I have got now 3 profiles: EmacsManifest, Musescore, Musik in: home/gfp/Projekte/ Now I want them to be activated at login time. I still am not sure how to do that. To activate multiple profiles at login time, I created a shell script called `~/sys/scripts/activate-profiles.sh`, containing the following code: ``` #!/bin/sh GUIX_PROFILES=/home/gjohnson/sys/guix/profiles for dir in $GUIX_PROFILES/* do name=$(basename "$dir") profile=$dir/$name if [ -f "$profile"/etc/profile ] then GUIX_PROFILE="$profile" . "$GUIX_PROFILE"/etc/profile export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH" export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH" fi unset profile unset name done ``` Next, I added a `source` line to my `~/.bash_profile` file, which loads the `activate-profiles.sh` script when I enter a login shell. This script is also run when you log in to your graphical desktop session in Guix. ``` # Activate all of my Guix profiles source ~/sys/scripts/activate-profiles.sh ``` For you to use this approach, you should do the following: 1. Replace `GUIX_PROFILES=/home/gjohnson/sys/guix/profiles` in my `activate-profiles.sh` script with your profile directory, which seems to be this: `GUIX_PROFILES=/home/gfp/Projekte` 2. Place the `activate-profiles.sh` script somewhere in your home directory. 3. Replace `~/sys/scripts/activate-profiles.sh` in `~/.bash_profile` with the path to `activate-profiles.sh` on your system. If you use `guix home`, you can certainly add the `source` line to `~/.bash_profile` that way. 2. after that, could I uninstall the package emacs in my main profile? Will my Emacs-manifest profile still be usable/is it independent, or it will suffer through uninstalling emacs in my main profile? With this code in place, whenever you log in to your machine, you will have access to all the packages in your main user profile as well as all the packages in your /home/gfp/Projekte profiles. Note that this may lead to unpredictable behavior if you have the same package installed into multiple profiles that are all activated simultaneously. My recommendation is that you install each package into only one profile when using this approach. My aim was to uninstall packages in my main profile and put them in separate profiles, so in updating my main profile with less package
Fwd: Help-Guix Digest, Vol 88, Issue 4
Weitergeleitete Nachricht Betreff: Re: Help-Guix Digest, Vol 88, Issue 4 Datum: Sat, 25 Mar 2023 11:45:16 +0100 Von: Gottfried An: Gary Johnson Hi, thanks a lot for your help. 1. did you create your system configuration quite in the beginning after having installed Guix? 2. Because later, like in my case, it takes much more work to adjust everything. 3. Note that this may lead to unpredictable behavior if you have the same package installed into multiple profiles that are all activated simultaneously. Would there be a problem in having musescore-3.6.2 in one profile (a distinct version of musescore) and musescore 4 (the ongoing updating) in an other profile? 4. Have I understood you correctly that you install only one package in one manifest and additionally only one package in one profile? 4. If so, you have at least 50 profiles and 20 manifests I guess. 5. In my case I would have to uninstall every package I have installed, except the global packages, system services etc. that Guix installed when I installed Guix System. 6. After that I would have to create guix home 7. In guix home I would have to install the local packages for $USER, which I even don’t know yet, which belong to them. 8. I would have to install local packages for $USER, manifests in each profile, which I have deleted im my general profile. 9. Would it then not be easier to reinstall Guix and I have then got only the system packages in my system configuration, and I can install guix home and later manifests like emacs packages or each single packages each in a separate profile? Or can I now also do this step by step, which would be probably easier for me, because if something goes wrong or I need to ask I still have Guix System installed? 10. For you it would be possible everything in one day, for me I am not sure, how long does it take, and that only with the help of Guix hackers. Kind regards Gottfried am 21.03.23 um 15:42 schrieb Gary Johnson: To activate multiple profiles at login time, I created a shell script called `~/sys/scripts/activate-profiles.sh`, containing the following code: ``` #!/bin/sh GUIX_PROFILES=/home/gjohnson/sys/guix/profiles for dir in $GUIX_PROFILES/* do name=$(basename "$dir") profile=$dir/$name if [ -f "$profile"/etc/profile ] then GUIX_PROFILE="$profile" . "$GUIX_PROFILE"/etc/profile export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH" export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH" fi unset profile unset name done ``` Next, I added a `source` line to my `~/.bash_profile` file, which loads the `activate-profiles.sh` script when I enter a login shell. This script is also run when you log in to your graphical desktop session in Guix. ``` # Activate all of my Guix profiles source ~/sys/scripts/activate-profiles.sh ``` For you to use this approach, you should do the following: 1. Replace `GUIX_PROFILES=/home/gjohnson/sys/guix/profiles` in my `activate-profiles.sh` script with your profile directory, which seems to be this: `GUIX_PROFILES=/home/gfp/Projekte` 2. Place the `activate-profiles.sh` script somewhere in your home directory. 3. Replace `~/sys/scripts/activate-profiles.sh` in `~/.bash_profile` with the path to `activate-profiles.sh` on your system. If you use `guix home`, you can certainly add the `source` line to `~/.bash_profile` that way. 2. after that, could I uninstall the package emacs in my main profile? Will my Emacs-manifest profile still be usable/is it independent, or it will suffer through uninstalling emacs in my main profile? With this code in place, whenever you log in to your machine, you will have access to all the packages in your main user profile as well as all the packages in your /home/gfp/Projekte profiles. Note that this may lead to unpredictable behavior if you have the same package installed into multiple profiles that are all activated simultaneously. My recommendation is that you install each package into only one profile when using this approach. My aim was to uninstall packages in my main profile and put them in separate profiles, so in updating my main profile with less packages it doesn’t take so much time. Yes, that is precisely the purpose of this approach. Happy hacking! Gary -- OpenPGP_0x61FAF349C9FB7F94.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Help-Guix Digest, Vol 88, Issue 4
Gottfried writes: > I have got now 3 profiles: EmacsManifest, Musescore, Musik > in: home/gfp/Projekte/ > > Now I want them to be activated at login time. > > I still am not sure how to do that. To activate multiple profiles at login time, I created a shell script called `~/sys/scripts/activate-profiles.sh`, containing the following code: ``` #!/bin/sh GUIX_PROFILES=/home/gjohnson/sys/guix/profiles for dir in $GUIX_PROFILES/* do name=$(basename "$dir") profile=$dir/$name if [ -f "$profile"/etc/profile ] then GUIX_PROFILE="$profile" . "$GUIX_PROFILE"/etc/profile export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH" export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH" fi unset profile unset name done ``` Next, I added a `source` line to my `~/.bash_profile` file, which loads the `activate-profiles.sh` script when I enter a login shell. This script is also run when you log in to your graphical desktop session in Guix. ``` # Activate all of my Guix profiles source ~/sys/scripts/activate-profiles.sh ``` For you to use this approach, you should do the following: 1. Replace `GUIX_PROFILES=/home/gjohnson/sys/guix/profiles` in my `activate-profiles.sh` script with your profile directory, which seems to be this: `GUIX_PROFILES=/home/gfp/Projekte` 2. Place the `activate-profiles.sh` script somewhere in your home directory. 3. Replace `~/sys/scripts/activate-profiles.sh` in `~/.bash_profile` with the path to `activate-profiles.sh` on your system. If you use `guix home`, you can certainly add the `source` line to `~/.bash_profile` that way. > 2. after that, could I uninstall the package emacs in my main profile? > Will my Emacs-manifest profile still be usable/is it independent, or > it will suffer through uninstalling emacs in my main profile? With this code in place, whenever you log in to your machine, you will have access to all the packages in your main user profile as well as all the packages in your /home/gfp/Projekte profiles. Note that this may lead to unpredictable behavior if you have the same package installed into multiple profiles that are all activated simultaneously. My recommendation is that you install each package into only one profile when using this approach. > My aim was to uninstall packages in my main profile and put them in > separate profiles, so in updating my main profile with less packages > it doesn’t take so much time. Yes, that is precisely the purpose of this approach. Happy hacking! Gary -- Protect yourself from surveillance: https://emailselfdefense.fsf.org === () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments Why is HTML email a security nightmare? See https://useplaintext.email/ Please avoid sending me MS-Office attachments. See http://www.gnu.org/philosophy/no-word-attachments.html
Re: Help-Guix Digest, Vol 88, Issue 4
Hi, thanks very much for your help. I have got now 3 profiles: EmacsManifest, Musescore, Musik in: home/gfp/Projekte/ Now I want them to be activated at login time. I still am not sure how to do that. You wrote: I should place this code (?) in my /bash profile. 1. How to do that? underneath is the profile: EmacsManifest 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). 2. after that, could I uninstall the package emacs in my main profile? Will my Emacs-manifest profile still be usable/is it independent, or it will suffer through uninstalling emacs in my main profile? My aim was to uninstall packages in my main profile and put them in separate profiles, so in updating my main profile with less packages it doesn’t take so much time. Kind regards Gottfried Am 06.03.23 um 02:35 schrieb Gary Johnson: Gottfried 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 -- OpenPGP_0x61FAF349C9FB7F94.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Help-Guix Digest, Vol 88, Issue 4
Gottfried writes: > Hi, Hello! > 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? Those 2 line are bash commands, GUIX_PROFILE="~/guix-profiles/emacs/emacs" will set a shell variable GUIX_PROFILE with a value of "$HOME/guix-profiles/emacs/emacs". . "$GUIX_PROFILE"/etc/profile will 'source' the /etc/profile in the $GUIX_PROFILE directory. You can find them in 'info bash' at: "5 Shell Variables" and "4.1 Bash Shell Builtins". > > 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?) Yes, the system profile (via config.scm) and user profile already do a split, and you can split the user profile into multiple profiles for more control. See 'info guix-cookbook' for "Guix Profiles in Practice". > > 3. > I was creating a profile with "Musescore" > and a profile with "Emacs". > I want to create still other profiles. No problem. > > 4. > Now I still don’t understand everything concerning profiles. > If I enable all profiles at login time > how will it work? Enable a profile mean source ('.' command in your first question) its profile file to add its search-paths to the current shell environment: PATH for making binaries from profiles's bin directory available to the current shell. MANPATH for making manpages from profile's share/man dinectory available to the current shell's 'man' command. XDG_DATA_DIRS for making desktop applicatinons available to the current desktop environment (launcher, etc). And so on... > How can I enter the different profiles? If you enable all at login time (via ~/.bash_profile), there is no need to switch. If you didn't enable a profile, you can switch it with 'guix shell -p' or '.' its profile. > How do I know in which profile I am and to switch to an other? You can run 'env' find out what profiles are activated now. > > 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? Run 'which emacs' return the emacs executable location, it maybe the one in your main profile or the emacs profile. There are some environment variables / search-paths (EMACSLOADPATH) for emacs, emacs will load its packages from this EMACSLOADPATH. When combine profiles via source ('.') the search-paths are merged (see 'export' in the 'profile' bash script), so they're connected via those search-paths. They can also be separated if you don't combine those search-paths. eg: via 'guix shell --pure -p ...' > But this emacs manifest doesn’t have a init.el file etc. Emacs's init.el are at ~/.emacs.d/init.el (or ~/.emacs), it's out of guix's control, so shared with every emacs. > May be profiles are not completely separated in Guix like I understood > until now. Well, you can combine them (by default the system profile and user profile are combined), or use them in a separated way. Basic are shell, environment variables, and the effects of environment variables. Hope this helps!
Re: Help-Guix Digest, Vol 88, Issue 4
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 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"/
Re: Help-Guix Digest, Vol 88, Issue 4
Gottfried 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 -- Protect yourself from surveillance: https://emailselfdefense.fsf.org === () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments Why is HTML email a security nightmare? See https://useplaintext.email/ Please avoid sending me MS-Office attachments. See http://www.gnu.org/philosophy/no-word-attachments.html
Re: Help-Guix Digest, Vol 88, Issue 4
Hi Wojtek, thanks very much. With your help I managed to create the Emacs Profile. I had to add still a name: "guix-profile" for it, than it worked. gfp@Tuxedo ~$ gfp@Tuxedo ~$ guix package -p /home/gfp/Projekte/EmacsManifest/guix-profil -m /home/gfp/Projekte/EmacsManifest/emacs.scm --- If I do a: gfp@Tuxedo ~$ guix shell -p /home/gfp/Projekte/EmacsManifest/guix-profil than I am in the profile: gfp@Tuxedo ~ (env) $ but writing: "emacs" it opens my emacs in the main profile and not the emacs in this newly created profile. Which command do I have to use to open emacs in this profile? Kind regards Gottfried When you do guix package -m path/to/manifest.scm It shall *replace* the packages in your default profile (~/.guix-profile) with those specified by the manifest. But if you instead do guix package -p path/to/some/profile -m path/to/manifest.scm It shall modify/initialize the profile you specified :) Best, Wojtek OpenPGP_0x61FAF349C9FB7F94.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Help-Guix Digest, Vol 88, Issue 4
Hi Gottfried > 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. When you do guix package -m path/to/manifest.scm It shall *replace* the packages in your default profile (~/.guix-profile) with those specified by the manifest. But if you instead do guix package -p path/to/some/profile -m path/to/manifest.scm It shall modify/initialize the profile you specified :) Best, Wojtek -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A ♥ R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷ c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ== ✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ== | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8= -- (sig_end) On Sun, 5 Mar 2023 08:44:15 + Gottfried wrote: > Hi Gary, > > 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. > > 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? > > > 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. > > > Kind regards > > Gottfried > > > > Message: 1 > > Date: Thu, 02 Mar 2023 10:10:38 -0500 > > From: Gary Johnson > > To: Rodrigo Morales > > > > I do manage all of my Emacs packages with Guix. I list `emacs` and all > > of its packages in a manifest file (emacs.scm). It looks like this with > > my custom packages elided: > > > > ``` > > (use-modules ((gnu packages) #:select (specifications->manifest))) > > > > (specifications->manifest > > (list "emacs" > > "emacs-adoc-mode" > > "emacs-alsamixer-el" > > "emacs-async" > > "emacs-calibredb" > > "emacs-cider" > > "emacs-clojure-mode" > > "emacs-company" > > "emacs-crdt" > > "emacs-csv-mode" > > "emacs-elpher" > > "emacs-emms" > > "emacs-eww-lnum" > > "emacs-exwm" > > "emacs-flycheck" > > "emacs-flymake-kondor" > > "emacs-flyspell-correct" > > "emacs-forge" > > "emacs-geiser" > > "emacs-geiser-guile" > > "emacs-gnuplot" > > "emacs-google-translate" > > "emacs-helm" > > "emacs-helm-ag" > > "emacs-helm-descbinds" > > "emacs-helm-swoop" > > "emacs-htmlize" > > "emacs-magit" > > "emacs-markdown-mode" > > "emacs-nov-el" > > "emacs-ob-async" > > "emacs-org" > > "emacs-org-pomodoro" > > "emacs-ox-gfm" > > "emacs-paredit" > > "emacs-pdf-tools" > > "emacs-pinentry" > > "emacs-rjsx-mode" > > "emacs-shroud" > > "emacs-telephone-line" > > "emacs-treemacs" > > "emacs-vterm" > > "emacs-web-mode" > > "emacs-which-key" > > "mu")) > > ``` > > > > I actually split up all the user packages on my system into manifests > > and isntall each one into its own profile, which I then activate on > > startup. However, that's not really necessary for this example. You can > > install the manifest packages above into your user profile with this > > command: > > > > ``` > > guix package -m emacs.scm > > ``` > > > ~Gary > > > pgpmrLIGrJh5J.pgp Description: OpenPGP digital signature
Re: Help-Guix Digest, Vol 88, Issue 4
Hi Gary, 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. 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? 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. Kind regards Gottfried Message: 1 Date: Thu, 02 Mar 2023 10:10:38 -0500 From: Gary Johnson To: Rodrigo Morales I do manage all of my Emacs packages with Guix. I list `emacs` and all of its packages in a manifest file (emacs.scm). It looks like this with my custom packages elided: ``` (use-modules ((gnu packages) #:select (specifications->manifest))) (specifications->manifest (list "emacs" "emacs-adoc-mode" "emacs-alsamixer-el" "emacs-async" "emacs-calibredb" "emacs-cider" "emacs-clojure-mode" "emacs-company" "emacs-crdt" "emacs-csv-mode" "emacs-elpher" "emacs-emms" "emacs-eww-lnum" "emacs-exwm" "emacs-flycheck" "emacs-flymake-kondor" "emacs-flyspell-correct" "emacs-forge" "emacs-geiser" "emacs-geiser-guile" "emacs-gnuplot" "emacs-google-translate" "emacs-helm" "emacs-helm-ag" "emacs-helm-descbinds" "emacs-helm-swoop" "emacs-htmlize" "emacs-magit" "emacs-markdown-mode" "emacs-nov-el" "emacs-ob-async" "emacs-org" "emacs-org-pomodoro" "emacs-ox-gfm" "emacs-paredit" "emacs-pdf-tools" "emacs-pinentry" "emacs-rjsx-mode" "emacs-shroud" "emacs-telephone-line" "emacs-treemacs" "emacs-vterm" "emacs-web-mode" "emacs-which-key" "mu")) ``` I actually split up all the user packages on my system into manifests and isntall each one into its own profile, which I then activate on startup. However, that's not really necessary for this example. You can install the manifest packages above into your user profile with this command: ``` guix package -m emacs.scm ``` ~Gary -- OpenPGP_0x61FAF349C9FB7F94.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature