On 02/23/2017 07:07 PM, Leo Famulari wrote: > On Thu, Feb 23, 2017 at 12:58:21PM +0100, pelzflorian (Florian Pelz) wrote: >> 1) start guix-daemon with an environment in which TMPDIR is set to >> /tmpdir and > > I exposed this feature in the guix-shepherd-service with commit > b191f0a6c50f2a7d47037ef8509d0351f5a2646e. > > In order to use it, you'll need to use modify-services as shown in the > manual, section Using the Configuration System: >
This works well. Thank you! > https://www.gnu.org/software/guix/manual/html_node/Using-the-Configuration-System.html#System-Services > >> 2) change my Guix system configuration so that it automatically creates >> a /tmpdir directory. > > This remains to be done in (guix-activation). Would you, or anyone else, > like to try it? > I suppose you mean changing (guix-activation) to create tmpdir if tmpdir is set? I can’t quite wrap my head around this pattern matching and G-expression code. This attempt does not work; also I’m afraid my trial-and-error changes break stuff. It’s better if someone else does it who knows what this does. (define (guix-activation config) "Return the activation gexp for CONFIG." (match config (($ <guix-configuration> guix build-group build-accounts authorize-key? keys tmpdir) ;; Assume that the store has BUILD-GROUP as its group. We could ;; otherwise call 'chown' here, but the problem is that on a COW unionfs, ;; chown leads to an entire copy of the tree, which is a bad idea. #~(list ;; Optionally authorize hydra.gnu.org's key. #$@(if authorize-key? #~(begin #$@(map (cut hydra-key-authorization <> guix) keys)) #~#f) ;; If a tmpdir is set, create tmpdir if it does not exist. #$@(if tmpdir #~(begin (use-modules (guix build utils)) (mkdir-p tmpdir)) #~#f)))))
