Emacs and emacs-guix

Hello, my second question (after the one on swap):

I installed emacs with guix install, and after a guix home import i get this:

(home-environment
  ;; Below is the list of packages that will show up in your
  ;; Home profile, under ~/.guix-home/profile.
  (packages (specifications->packages (list "emacs"
                                            "emacs-guix"
                                            "icecat"
                                            "htop")))

But calling M-x guix has no effect untill I rebooted.
Now it’s ok, works fine, but why is it so ?
The only command that was available was: guix-emacs-autoload-packages, which I ran with M-x

Which leads me to a more fundamental question (I had the same on NixOS and was never able to sort out). When you have a package, for example emacs-beginend, in the guix repo, should you get it from the guix repo (guix install emacs-beginend'), or install it through emacs (for example through use-package’ or `straight’) ?

Thanks in advance for helping my understanding …

It has to do with the shell startup and how guix is loaded and guix managed profiles added to the environment.

If you look at .bash_profile which is read for bash login shells, it sources .profile which sets up guix home. Presumably after you installed guix home you didn’t manually source .profile to set it up after the initial configuration.

It’s a matter of personal preference how you manage your system. Generally, the the parts managed by guix should be more static and settled I suppose since you don’t want to have to be rebuilding the environment for a minor change. Also if there’s an emacs package on guix you could write your own packages for them and still manage them with guix.

As @moto said this has to do with how your shell startup and where emacs looks for lisp files to load.

When you install emacs packages from Guix it has to tell Emacs where to find those packages, because Guix is something external to Emacs. That happens when your .profile is sourced and Guix is setting up you Home profile.

Whatever to install emacs packages through Guix or some other means is mostly a personal preference.
The benefit with Guix is that you usually get other programs that something is required (like for pdf-tools and vterm) also set up.
The disadvantages iof course is that it requires Guix.

I like to keep my Emacs config in a literate org-file and use elpaca for installing and updating packages. But I have been tempted to try out the Guix way.