diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2019-11-30 18:42:27 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2019-12-07 00:59:56 +0100 |
| commit | eaabc5e87f4e48d7bce88ca231f5fc2d554ca3d6 (patch) | |
| tree | 9f9d300bc392a632765bf1e2e4b830307c1167ca /gnu/machine.scm | |
| parent | b85836d3067a0faccc945d584dfb88cf557eee97 (diff) | |
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.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/machine.scm b/gnu/machine.scm index 05b03b21d49..b342fe21440 100644 --- a/gnu/machine.scm +++ b/gnu/machine.scm | |||
| @@ -93,11 +93,16 @@ | |||
| 93 | make-machine | 93 | make-machine |
| 94 | machine? | 94 | machine? |
| 95 | this-machine | 95 | this-machine |
| 96 | (operating-system machine-operating-system) ; <operating-system> | 96 | (operating-system %machine-operating-system); <operating-system> |
| 97 | (environment machine-environment) ; symbol | 97 | (environment machine-environment) ; symbol |
| 98 | (configuration machine-configuration ; configuration object | 98 | (configuration machine-configuration ; configuration object |
| 99 | (default #f))) ; specific to environment | 99 | (default #f))) ; specific to environment |
| 100 | 100 | ||
| 101 | (define (machine-operating-system machine) | ||
| 102 | "Return the operating system of MACHINE." | ||
| 103 | (operating-system-with-provenance | ||
| 104 | (%machine-operating-system machine))) | ||
| 105 | |||
| 101 | (define (machine-display-name machine) | 106 | (define (machine-display-name machine) |
| 102 | "Return the host-name identifying MACHINE." | 107 | "Return the host-name identifying MACHINE." |
| 103 | (operating-system-host-name (machine-operating-system machine))) | 108 | (operating-system-host-name (machine-operating-system machine))) |
