* Setting TMPDIR for Guix
@ 2017-02-23 11:58 pelzflorian (Florian Pelz)
2017-02-23 18:07 ` Leo Famulari
0 siblings, 1 reply; 3+ messages in thread
From: pelzflorian (Florian Pelz) @ 2017-02-23 11:58 UTC (permalink / raw)
To: help-guix
Hello,
I suspect some package builds fail for me because I have only 2GB of RAM
and /tmp may be full. Either way, I want to use a different TMPDIR
environment variable for the Guix daemon.
I’d like to
1) start guix-daemon with an environment in which TMPDIR is set to
/tmpdir and
2) change my Guix system configuration so that it automatically creates
a /tmpdir directory.
On systemd I just change the TMPDIR for Guix using `systemctl edit
guix-daemon` but how do I set this environment variable on GuixSD?
I cannot find this information in `info guix` but maybe I should have
searched more carefully.
Regards,
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Setting TMPDIR for Guix
2017-02-23 11:58 Setting TMPDIR for Guix pelzflorian (Florian Pelz)
@ 2017-02-23 18:07 ` Leo Famulari
2017-02-24 10:41 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2017-02-23 18:07 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: help-guix
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:
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Setting TMPDIR for Guix
2017-02-23 18:07 ` Leo Famulari
@ 2017-02-24 10:41 ` pelzflorian (Florian Pelz)
0 siblings, 0 replies; 3+ messages in thread
From: pelzflorian (Florian Pelz) @ 2017-02-24 10:41 UTC (permalink / raw)
To: Leo Famulari; +Cc: help-guix
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)))))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-24 10:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 11:58 Setting TMPDIR for Guix pelzflorian (Florian Pelz)
2017-02-23 18:07 ` Leo Famulari
2017-02-24 10:41 ` pelzflorian (Florian Pelz)
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.