Changes between Version 11 and Version 12 of Questions and Answers


Ignore:
Timestamp:
04/29/25 22:07:24 (4 weeks ago)
Author:
enno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Questions and Answers

    v11 v12  
    11== Profiles and home configuration
    22
    3 '''Q:''' I heard that there are different ways to declare or install software packages into the environment. What are the use cases, the pros and cons?
     3Q: I’ve heard there are different ways to install or declare packages in Guix. What are the use cases, and what are the pros and cons?
     4A: Yes, Guix supports multiple ways to install and manage software packages, each with its own use case:
    45
    5 '''A:''' You can manage and use packages in three different ways:
     6* System-wide installation (via the OS configuration):
    67
    7 * System wide (at OS configuration)
     8- Makes packages available to all users.
    89
    9 * Manually in the users [[default profile]]
     10- Best for shared tools or infrastructure software.
    1011
    11 * In your [[home configuration]] (portable across computers)
     12* User’s default profile (using guix install):
    1213
    13 * Use temporary environments (via guix shell python python-pandas bash --)
     14- Manual and ad hoc.
     15- Convenient for quickly installing software for personal use.
    1416
    15 '''WARNING''' Only packages installed in the same way play well together by default.
    16 If you install the same package in different ways it will shadow all but one.
     17* Home configuration (via guix home):
    1718
    18 '''Explanation:''' You declared the vim editor package a system level package, so that it is available for everyone. But a user installed it in his default profile as well.
    19 The system level vim is then shadowed. If - for some reason - the user additionally declares vim in his home configuration, it will shadow the others as well.
     19- Declarative and portable.
    2020
    21 If you install extension packages like vim-nerdtree in the system profile it might not be available for the vim at default user profile or [[home configuration]] profile, because
    22 the matching vim is shadowed.
     21- Ideal for maintaining a consistent user environment across machines.
     22
     23* Temporary environments (using guix shell):
     24
     25- Ephemeral, isolated environments for development or experimentation.
     26- Great for trying out tools without polluting your profiles.
     27
     28'''Important:''' Packages only behave well together if they’re installed using the same method.
     29
     30If the same package is installed via multiple methods (e.g., system + user profile), only one will be used, and it will shadow the others.
     31
     32Example:
     33
     34Suppose vim is installed system-wide. If a user then installs their own version of vim in their default profile, that version will shadow the system version. If they also declare vim in their guix home configuration, it will shadow both the system and user-installed versions.
     35
     36This becomes especially important when dealing with extensions or plugins.
     37For example, if vim-nerdtree is installed system-wide, but the user is using a vim from their home or user profile, the system-installed plugin might not work — because it’s tied to the shadowed version of vim.
    2338
    2439== CI / CD