aboutsummaryrefslogtreecommitdiff
path: root/gnu/machine.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-11-30 18:42:27 +0100
committerLudovic Courtès <ludo@gnu.org>2019-12-07 00:59:56 +0100
commiteaabc5e87f4e48d7bce88ca231f5fc2d554ca3d6 (patch)
tree9f9d300bc392a632765bf1e2e4b830307c1167ca /gnu/machine.scm
parentb85836d3067a0faccc945d584dfb88cf557eee97 (diff)
downloadguix-eaabc5e87f4e48d7bce88ca231f5fc2d554ca3d6.tar
guix-eaabc5e87f4e48d7bce88ca231f5fc2d554ca3d6.tar.gz
machine: Add provenance tracking to each machine operating system.
* gnu/machine.scm (<machine>): Rename accessor to '%machine-operating-system'. (machine-operating-system): New procedure. * doc/guix.texi (Service Reference): Mention it.
Diffstat (limited to 'gnu/machine.scm')
-rw-r--r--gnu/machine.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/machine.scm b/gnu/machine.scm
index 05b03b21d4..b342fe2144 100644
--- a/gnu/machine.scm
+++ b/gnu/machine.scm
@@ -93,11 +93,16 @@
make-machine
machine?
this-machine
- (operating-system machine-operating-system) ; <operating-system>
+ (operating-system %machine-operating-system); <operating-system>
(environment machine-environment) ; symbol
(configuration machine-configuration ; configuration object
(default #f))) ; specific to environment
+(define (machine-operating-system machine)
+ "Return the operating system of MACHINE."
+ (operating-system-with-provenance
+ (%machine-operating-system machine)))
+
(define (machine-display-name machine)
"Return the host-name identifying MACHINE."
(operating-system-host-name (machine-operating-system machine)))