aboutsummaryrefslogtreecommitdiff
path: root/.guix/guix-na/config/balg02.scm
diff options
context:
space:
mode:
authorCollin J. Doering2024-06-04 22:22:48 -0400
committerCollin J. Doering2024-06-04 22:22:48 -0400
commit26b3e02937a9b6cf7bd0c2968c8a30d504eb6501 (patch)
tree06e852065e3309d93b7b703fa9762efcb1aef9dc /.guix/guix-na/config/balg02.scm
parentbf8119a027a680c3f05714cbd2d38ed5c365f496 (diff)
downloadguix-north-america-26b3e02937a9b6cf7bd0c2968c8a30d504eb6501.tar.gz
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.
Diffstat (limited to '.guix/guix-na/config/balg02.scm')
-rw-r--r--.guix/guix-na/config/balg02.scm34
1 files changed, 33 insertions, 1 deletions
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"))