My $HOME/.config/guix directory, minus current symlink
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
jts b809ab1e11 Add Nyxt 2 months ago
home Add Nyxt 2 months ago
profiles Remove Haunt 2 months ago
scripts cleanup README, add OCaml 6 months ago
system Add file 2 months ago
.gitignore add .gitignore 7 months ago
README.md cleanup README, add OCaml 6 months ago
channels.scm Various changes, see full message 4 months ago
games.scm games: initial commit 8 months ago
nonguix-key.pub Initial commit 8 months ago

README.md

guix-config

My ~/.config/guix

Overview

All the stuff Guix looks for automatically is under ~/.config/guix, as well as similar files. Related files without expected paths are under dedicated directores:

Home

config.scm and supporting files for use with guix home reconfigure.

Profiles

Manifests and supporting files for use with guix package -m. Files are stored in dedicated directories, each with a descriptive name. Some profiles have subprofiles, such as Python's dev and web.

To install or update a profile run guix package -m ~/.config/guix/profiles/<profile>/manifest.scm -p ~/.guix-profiles/<profile>

To initialize a profile run . ~/.guix-profiles/<profile>/etc/profile

Note that the naming convention for the profiles proper of subprofiles is to append the parent profile's name and a hyphen to the subprofile directory. So for example, "profiles/python/dev" becomes "~/.guix-profiles/python-dev".

Or if you want to source all profiles on every login, add this to "~/.bash_profile" (already part of home configuration):

for i in "$HOME"/.config/guix/profiles/*; do
  if [ -f "$i"/manifest.scm ]; then
    profile="$HOME"/.guix-profiles/$(basename "$i")
    if [ -f "$profile"/etc/profile ]; then
      GUIX_PROFILE="$profile"
      . "$GUIX_PROFILE"/etc/profile
    fi
    unset profile
  fi
done

More information can be found in the Guix Cookbook or the Guix Manual.

System

config.scm and supporting files for use with guix system reconfigure

Scripts

The scripts directory contains pure sh scripts for system administration.

Installation

This is an overview of how I install Guix. This is for me, so it might not be useful to anyone else. I might make this into a pair of shell scripts, but I'll keep track of the steps here.

  1. Boot installer, edit grub commandline to blacklist amdgpu, optionally pcspkr and sp5100_tco
  2. Install, using cell tethering if necessary
  3. Blacklist amdgpu on first boot, clone guix-config, modify filesystems as needed
  4. guix pull && sudo guix system reconfigure ~/.config/guix/config.scm
  5. Reboot into proper system, now in GUI
  6. Configure network, change keybindings, switch themes
  7. guix pull && guix home reconfigure ~/.config/guix/home
  8. git config --global user.name "jts" && git config --global user.email "jtsims@pm.me"
  9. git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d; emacs
  10. While those run, sign into Firefox account in Epiphany, then email, then gits
  11. Sign into Firefox, corporate platforms
  12. Modify .desktop files for Emacs and DrRacket as follows:

Emacs

cp ~/.guix-profile/share/applications/emacs.desktop ~/.local/share/applications/spacemacs.desktop
nvim ~/.local/share/applications/spacemacs.desktop

Name=Spacemacs Exec=emacs %F Icon=/home/jts/.emacs.d/core/banners/img/spacemacs.png

DrRacket

cp ~/.guix-profile/share/racket/pkgs/drracket/drracket/drracket.desktop ~/.local/share/applications/
nvim ~/.local/share/applications/drracket.desktop

Icon=/home/jts/.guix-profile/share/racket/pkgs/drracket/drracket/drracket.png

  1. Edit .spacemacs as desired and SPC q R or SPC q q
  2. flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && flatpak install flathub im.riot.Riot com.discordapp.Discord
  3. Login to chat platforms (IRC in Spacemacs, Matrix in Element, Discord)
  4. Reboot, everything should be ready; gc or whatever now
  5. (Optional) cp $(guix image --image-type=iso6990 ~/.config/guix/config.scm) Téléchargements/guix-jts.iso

Usage

Using dedicated profiles for sets of packages, as well as Guix home management, changes the dynamics of using Guix from the default workflow. Here are some notes to avoid getting lost.

Installing Packages

The usual guix install still works, but there are two other ways to install packages as well, and the dynamics of installation are different.

  • guix install - temporary; packages will be removed at next guix home reconfigure
  • adding to home/config.scm - permanent; packages will be part of the default profile
  • adding dedicated profile - permanent; packages will be in loaded profiles; for logical sets of multiple packages

Upgrading

This is a much more complex process for a full upgrade. Things always start with guix pull and the system is still guix system reconfigured, but profiles require special handling, as does the home environment cum default profile.

There are two ways to upgrade the default profile's packages. guix upgrade works just fine if no changes have been made to the home configuration. If changes have been made, though, run guix home reconfigure.

Upgrading non-default profiles is more involved. Essentially, each must be upgraded with the path to the profile root as the final argument to guix upgrade -p. Alternatively, one may use guix package -m path/to/manifest.scm -p path/to/profile/root to recreate the profile whole. This is best done by looping over profiles/*.

If one merely wishes to upgrade packages in all loaded profiles, guix upgrade works just fine.

"scripts/full-upgrade" uses the preferred method for a full upgrade of all profiles.

Garbage Collection

When deleting past generations, there are now more places to find them. There are generations for system configurations, home configurations, the default profile (distinct from the home), and each special profile.

The system and home generations are deleted with guix system|home delete-generations [pattern].

The default profile generations are deleted with guix packages --delete-generations [pattern].

Special profiles are deleted similarly to the default profile, but their root directory's path must be passed to the -p flag, eg guix package --delete-generations [pattern] -p path/to/profile/root. This is done most efficiently by looping over "profiles/*".

"scripts/full-gc" deletes all previous generations of all profiles.