diff options
author | Ludovic Courtès <ludo@gnu.org> | 2024-02-18 12:39:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-02-18 15:34:43 +0100 |
commit | 1cff19d8d4d99f502db43cff6e9e7472197256f4 (patch) | |
tree | 0259f365715681893a62057384ba2748d1327b99 /gnu/services | |
parent | cd0dc17e43d4020d4e56afa32b6cc05072fe2e0e (diff) | |
download | guix-1cff19d8d4d99f502db43cff6e9e7472197256f4.tar.gz |
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
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/virtualization.scm | 16 |
1 files changed, 16 insertions, 0 deletions
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) |