Changes between Version 11 and Version 12 of Questions and Answers
- Timestamp:
- 04/29/25 22:07:24 (4 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Questions and Answers
v11 v12 1 1 == Profiles and home configuration 2 2 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? 3 Q: 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? 4 A: Yes, Guix supports multiple ways to install and manage software packages, each with its own use case: 4 5 5 '''A:''' You can manage and use packages in three different ways:6 * System-wide installation (via the OS configuration): 6 7 7 * System wide (at OS configuration) 8 - Makes packages available to all users. 8 9 9 * Manually in the users [[default profile]] 10 - Best for shared tools or infrastructure software. 10 11 11 * In your [[home configuration]] (portable across computers)12 * User’s default profile (using guix install): 12 13 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. 14 16 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): 17 18 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. 20 20 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 30 If 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 32 Example: 33 34 Suppose 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 36 This becomes especially important when dealing with extensions or plugins. 37 For 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. 23 38 24 39 == CI / CD