[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/13: services: virtual-build-machine: Add ‘configuration’ action.
From: |
guix-commits |
Subject: |
05/13: services: virtual-build-machine: Add ‘configuration’ action. |
Date: |
Sun, 18 Feb 2024 10:19:16 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 1cff19d8d4d99f502db43cff6e9e7472197256f4
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Feb 18 12:39:26 2024 +0100
services: virtual-build-machine: Add ‘configuration’ action.
* gnu/services/virtualization.scm (build-vm-shepherd-services): Add
‘configuration’ action.
* doc/guix.texi (Virtualization Services): Document it.
Change-Id: I4734e096d744b3cda0d523692498a73c0029e188
---
doc/guix.texi | 6 +++++-
gnu/services/virtualization.scm | 16 ++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 04119a5955..fe6f82d4a5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36396,7 +36396,11 @@ set to a date several years in the past, and on a CPU
model that
corresponds to that date---a model possibly older than that of your
machine. This lets you rebuild today software from the past that would
otherwise fail to build due to a time trap or other issues in its build
-process.
+process. You can view the VM's config like this:
+
+@example
+herd configuration build-vm
+@end example
You can configure the build VM, as in this example:
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index ea5edfcec3..7b04ddb35e 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -1342,6 +1342,22 @@ authpriv.*;auth.info /var/log/secure
(kill (- pid) SIGTERM)
(apply throw key args)))))))
(stop #~(make-kill-destructor))
+ (actions
+ (list (shepherd-action
+ (name 'configuration)
+ (documentation
+ "Display the configuration of this virtual build machine.")
+ (procedure
+ #~(lambda (_)
+ (format #t "CPU: ~a~%"
+ #$(virtual-build-machine-cpu config))
+ (format #t "number of CPU cores: ~a~%"
+ #$(virtual-build-machine-cpu-count config))
+ (format #t "memory size: ~a MiB~%"
+ #$(virtual-build-machine-memory-size config))
+ (format #t "initial date: ~a~%"
+ #$(date->string
+ (virtual-build-machine-date config))))))))
(auto-start? (virtual-build-machine-auto-start? config)))))
(define (authorize-guest-substitutes-on-host)
- branch master updated (f8f0a5954a -> fdbf4192f5), guix-commits, 2024/02/18
- 02/13: services: virtual-build-machine: Do not offload when service is stopped., guix-commits, 2024/02/18
- 01/13: services: block-facebook-hosts: Use proper unroutable addresses., guix-commits, 2024/02/18
- 04/13: services: virtual-build-machine: Add periodic GC job., guix-commits, 2024/02/18
- 03/13: services: virtual-build-machine: Use a non-volatile root file system., guix-commits, 2024/02/18
- 05/13: services: virtual-build-machine: Add ‘configuration’ action.,
guix-commits <=
- 08/13: gnu: Add emacs-fdroid., guix-commits, 2024/02/18
- 13/13: gnu: bemenu: Install man pages, guix-commits, 2024/02/18
- 10/13: gnu: Add go-github-com-cli-safeexec., guix-commits, 2024/02/18
- 12/13: gnu: Add git-sizer., guix-commits, 2024/02/18
- 06/13: gnu: Add snapper., guix-commits, 2024/02/18
- 07/13: gnu: Add restartd., guix-commits, 2024/02/18
- 09/13: gnu: Add libdisplay-info., guix-commits, 2024/02/18
- 11/13: gnu: Add go-go-uber-org-goleak., guix-commits, 2024/02/18