I’d like to change my Guix System to build packages in a different location (`/dev/shm/`) so that they are built on a tmpfs partition to hopefully speed up builds (defaults to `/tmp` which is on the `/` partition on Guix System). The Guix Manual only mentions that this may be done by setting the environment variable `TMPDIR`.
I was able to do this for a system that is configured as a foreign install by modifying the SystemD service file (Guix Mailing List), but I haven’t been able to figure out how to modify my `/etc/config.scm` file to do this on Guix System.
I’ve never tried this personally, but in the configuration file, you may have to modify the service type
(guix-service-type ...)
. See an example over here. You can view all the valid record fields over here in the data type:(guix-configuration ...)
- you’ll be in need of(tmpdir ...)
, I would assume? You may also use(environment ...)
alternatively.Btw, the link that you’ve mentioned is for the channel that is fixed to tag 1.4.0 - I wish Guix folks had properly versioned the namespace for the manual. You may look into the devel branch. Adding diff below:
1c1 < https://guix.gnu.org/manual/en/html_node/Invoking-guix_002ddaemon.html#:~:text=TMPDIR --- > https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix_002ddaemon.html#:~:text=TMPDIR
I had no idea on the manual version tag, I’ve probably been using an old one for a while… Thanks for pointing that out.
Ya, when it comes to modifying a Guix config, I haven’t gotten used to all the guile commands and different system names that guix uses, maybe eventually I’ll learn the semantics.