From 26b3e02937a9b6cf7bd0c2968c8a30d504eb6501 Mon Sep 17 00:00:00 2001 From: Collin J. Doering Date: Tue, 4 Jun 2024 22:22:48 -0400 Subject: balg02: Configure guix-deamon to build in parallel * .guix/guix-na/config/balg02.scm (guix-daemon-config): New function. (balg02): Modify guix-daemon service to enable build parallelism, and using substitutes from the local build server if available. --- .guix/guix-na/config/balg02.scm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to '.guix/guix-na') diff --git a/.guix/guix-na/config/balg02.scm b/.guix/guix-na/config/balg02.scm index 371f514..67e6b4d 100644 --- a/.guix/guix-na/config/balg02.scm +++ b/.guix/guix-na/config/balg02.scm @@ -418,6 +418,27 @@ synonymous IETF language tags that should be mapped to the same $lang." #~(let ((pid (call-with-input-file "/var/run/nginx/pid" read))) (kill pid SIGHUP)))) +;; Taken from https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/modules/sysadmin/services.scm +(define* (guix-daemon-config #:key (max-jobs 5) (cores 4) + (build-accounts-to-max-jobs-ratio 4) + (authorized-keys '()) + (substitute-urls '())) + (guix-configuration + (substitute-urls substitute-urls) + (authorized-keys authorized-keys) + + ;; We don't want to let builds get stuck for too long, but we still want + ;; to allow building things that can take a while (eg. 3h). Adjust as necessary. + (max-silent-time 3600) + (timeout (* 6 3600)) + + (log-compression 'gzip) ;be friendly to 'guix publish' users + + (build-accounts (* build-accounts-to-max-jobs-ratio max-jobs)) + (extra-options (list "--max-jobs" (number->string max-jobs) + "--cores" (number->string cores) + "--gc-keep-derivations")))) + (define (balg02 efi-boot-uuid) (operating-system (host-name "balg02") @@ -559,6 +580,17 @@ synonymous IETF language tags that should be mapped to the same $lang." (guix-publish-configuration (port 3000) (cache "/var/cache/guix/publish")))) - %base-services)))) + (modify-services %base-services + (guix-service-type config => (guix-daemon-config + #:substitute-urls + (cons "https://cuirass.genenetwork.org" + %default-substitute-urls) + #:max-jobs 20 + #:cores 4 + #:authorized-keys + (cons + (local-file "../../../.pubkeys/guix/cuirass.genenetwork.org.pub") + %default-authorized-guix-keys) + #:build-accounts-to-max-jobs-ratio 5))))))) (define %system (balg02 "3AF8-9E67")) -- cgit v1.2.3