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.
This commit is contained in:
		
							parent
							
								
									b85836d306
								
							
						
					
					
						commit
						eaabc5e87f
					
				
					 2 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
					@ -27129,8 +27129,8 @@ comparison less trivial.
 | 
				
			||||||
@end quotation
 | 
					@end quotation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This service is automatically added to your operating system
 | 
					This service is automatically added to your operating system
 | 
				
			||||||
configuration when you use @command{guix system reconfigure} or
 | 
					configuration when you use @command{guix system reconfigure},
 | 
				
			||||||
@command{guix system init}.
 | 
					@command{guix system init}, or @command{guix deploy}.
 | 
				
			||||||
@end defvr
 | 
					@end defvr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@node Shepherd Services
 | 
					@node Shepherd Services
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -93,11 +93,16 @@
 | 
				
			||||||
  make-machine
 | 
					  make-machine
 | 
				
			||||||
  machine?
 | 
					  machine?
 | 
				
			||||||
  this-machine
 | 
					  this-machine
 | 
				
			||||||
  (operating-system machine-operating-system) ; <operating-system>
 | 
					  (operating-system %machine-operating-system); <operating-system>
 | 
				
			||||||
  (environment      machine-environment)      ; symbol
 | 
					  (environment      machine-environment)      ; symbol
 | 
				
			||||||
  (configuration    machine-configuration     ; configuration object
 | 
					  (configuration    machine-configuration     ; configuration object
 | 
				
			||||||
                    (default #f)))            ; specific to environment
 | 
					                    (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)
 | 
					(define (machine-display-name machine)
 | 
				
			||||||
  "Return the host-name identifying MACHINE."
 | 
					  "Return the host-name identifying MACHINE."
 | 
				
			||||||
  (operating-system-host-name (machine-operating-system machine)))
 | 
					  (operating-system-host-name (machine-operating-system machine)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue