makadeade
home about archive

GNU Guix and its directories

Published: October 14th 2025 (week 42 of 2025)

GNU Guix needs two main directories to run: /gnu/store and /var/guix. By default, they are both mounted on / which can be problematic.

Guix is its own Linux distribution, but can also be used as an independent package manager on top of whatever Linux system you are already running. The latter is how I am using Guix, and it is why I have run into a problem.

My / resides on a pretty small (and pretty old) SSD. I figure that I do not need more than the 120 GB on it; core system and utilities do not take up that much space, and I clean the package manager cache regularly.

However, Guix puts its data in subdirectories on / and it started to fill up the disk. To solve this, I created two new partitions in the free space on another disk:

  1. 60 GB for /gnu/store
  2. 60 GB for /var/guix

I formatted both of them with btrfs, and mounted with exec permission (and also saved the configuration in /etc/fstab for future use). The store partition's mountpoint is /gnu, and Guix itself is responsible for creating the inner directory. The cache directory is mounted directly on /var/guix.

Everything seems to work fine.

Tags

Previous: N포세대