These profiles are default values
The only things that set these two profiles apart from "normal" GUIX profiles is that they are the default options of their respective GUIX commands (see here for how these two are different):
~/.guix-profile
is the default option of the guix package
option -p|--profile=
~/.config/guix/current
is the default option of the guix pull
option -p|--profile=
They're generated on the first call of their respective companion commands if they didn't exist before.
But you can completely do without these two profiles if you wish and use user-defined profiles all the time (see below)
They differ in their jobs: Provide a guix
version itself vs. provide other programs managed by guix
The profile ~/.config/guix/current
provides the binaries guix
and guix-daemon
. In the default configuration, this profile determines what is the most up-to-date version of all packages you can install. The list of packages you can install is tied to the guix version, in contrary to Nix. This blog post explains why.
- Concerning the user
root
, the binary provided by (the symlink target of) /root/.config/guix/current/bin/guix-daemon
is the GUIX Daemon that is started automatically by the system. It also has got a symlink in /usr/local/bin
.
The profile ~/.guix-profile
contains any package you want it to contain. Many users include it in their shell startup files, so they have often-used programs that don't belong to any other task-specific profile available automatically.
The profiles are integrated in your workflow only via shell-startup files and you can decide if they are effective
Which profiles are relevant for you is only determined by your .profile
(or .bash_profile
or whatever shell initialization file you use)
If you specify nothing, you will use no packages from guix
and the version of guix
itself that root
uses, because the GUIX shell installer script creates a symlink /usr/local/bin/guix -> /var/guix/profiles/per-user/root/guix
If you include in your .profile
(or similar)1
GUIX_PROFILE=$HOME/.config/guix/current;
source "$GUIX_PROFILE/etc/profile"
you can use your own version of GUIX and package versions.
If you include
GUIX_PROFILE="$HOME/.guix-profile";
source "$GUIX_PROFILE/etc/profile"
you load a profile which you can define/change without using the -p
parameter of guix package
. Of course, you can also load any other profile here, you then just have to use the -p
parameter if you want to change it. Many people use this profile to include commands they often need but which are not assigned to any task-specific workflow.
1 In case you wonder why you need to define a variable before sourcing, read the source'd script. It will add the link to the profile to $PATH
then, and not the profile folder itself. This means that you will automatically get updated package version if you call guix package -u
without source'ing the profile again.