mirror of
git://git.savannah.gnu.org/guix/maintenance.git
synced 2023-12-14 03:33:04 +01:00
hydra: Add offloading service to Berlin.
Add a service registering the /etc/guix/machines.scm file to enable the offload mechanism. * hydra/modules/sysadmin/services.scm (%offload-service): New variable. (frontend-services): Use it.
This commit is contained in:
parent
4fdd0b589a
commit
af0d279f40
|
@ -589,6 +589,8 @@ to a selected directory.")
|
|||
(cache-bypass-threshold cache-bypass-threshold)
|
||||
(workers publish-workers)))
|
||||
|
||||
%offload-service
|
||||
|
||||
%nginx-mime-types
|
||||
%nginx-cache-activation
|
||||
|
||||
|
@ -833,3 +835,28 @@ to a selected directory.")
|
|||
crash-dump-shepherd-services)))
|
||||
(default-value crash-dump)
|
||||
(description "Run a crash dump HTTP web server.")))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Offloading
|
||||
;;;
|
||||
|
||||
(define %offload-service
|
||||
;; Provide /etc/guix/machines.scm file.
|
||||
(simple-service
|
||||
'guix-machines.scm
|
||||
activation-service-type
|
||||
(with-imported-modules '((guix build utils))
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(if (file-exists? "/etc/guix/machines.scm")
|
||||
(if (and (symbolic-link? "/etc/guix/machines.scm")
|
||||
(store-file-name? (readlink "/etc/guix/machines.scm")))
|
||||
(delete-file "/etc/guix/machines.scm")
|
||||
(rename-file "/etc/guix/machines.scm"
|
||||
"/etc/guix/machines.scm.bak"))
|
||||
(mkdir-p "/etc/guix"))
|
||||
|
||||
;; Install the machines file.
|
||||
(symlink #$(local-file "../../machines-for-berlin.scm")
|
||||
"/etc/guix/machines.scm")))))
|
||||
|
|
Loading…
Reference in a new issue