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.

  • @rrobin
    link
    12 months ago

    I think it is configured in guix-configuration from the guix service type

    https://guix.gnu.org/manual/en/html_node/Base-Services.html

    there is a tmpdir option there (“A directory path where the guix-daemon will perform builds”).

    I have not tried this, but something like this on your list of services

    (service guix-service-type
      (guix-configuration
        (tmpdir "/whatever")))
    

    As usual for any big changes it is best to try running the operating system spec in a vm with guix system vm to see if it boots up ok.