Guix
Table of Contents
1. Guix
1.1. Cleaning up
sudo guix system delete-generations guix gc -d
To find what's taking space in /gnu/store/
:
ls -1 /gnu/store/ | sed 's|^|/gnu/store/|' | xargs -n 10000 du -hs | sort -h
To find the gc roots:
guix gc --list-roots
1.2. Build guix from source
https://guix.gnu.org/manual/en/html_node/Building-from-Git.html
git clone https://git.savannah.gnu.org/git/guix.git cd guix echo $PWD >> ~/.config/guix/shell-authorized-directories
guix shell # OR guix shell-D guix --pure ./bootstrap ./configure --localstatedir=/var make
./pre-inst-env scripts/guix describe
1.3. How to build a package from a clone of guix?
./pre-inst-env scripts/guix build hello
1.4. guix/maintenance.git
Repository meant to contain documents and tools by Guix hackers and maintainers that do not fit in the Guix repository.
1.5. Cuirass
Cuirass is a continuous integration tool for Guix. It can be used both for development and for providing substitutes to others.
1.6. Running nix on guix
- add the service
(service nix-service-type)
- install the package
nix
- add a channel e.g.
nix-channel --add https://nixos.org/channels/nixos-24.05
nix-channel --update
ln -s "/nix/var/nix/profiles/per-user/$USER/profile" ~/.nix-profile
source /run/current-system/profile/etc/profile.d/nix.fish
- Create missing directories
sudo mkdir -m 0755 -p /nix/var/nix/{profiles,gcroots}/per-user/$USER
- Give the directories the right owners
sudo chown -R $USER:nixbld /nix/var/nix/profiles/per-user/$USER