mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
machine: Add 'build-locally?' field for managed hosts.
* gnu/machine/ssh.scm (machine-ssh-configuration-build-locally?): New variable. (managed-host-remote-eval): Pass 'build-locally?' to 'remote-eval'.
This commit is contained in:
parent
9bd1333e58
commit
d84e9b75b2
1 changed files with 16 additions and 10 deletions
|
@ -44,6 +44,7 @@ (define-module (gnu machine ssh)
|
|||
machine-ssh-configuration
|
||||
|
||||
machine-ssh-configuration-host-name
|
||||
machine-ssh-configuration-build-locally?
|
||||
machine-ssh-configuration-port
|
||||
machine-ssh-configuration-user
|
||||
machine-ssh-configuration-session))
|
||||
|
@ -66,15 +67,17 @@ (define-record-type* <machine-ssh-configuration> machine-ssh-configuration
|
|||
make-machine-ssh-configuration
|
||||
machine-ssh-configuration?
|
||||
this-machine-ssh-configuration
|
||||
(host-name machine-ssh-configuration-host-name) ; string
|
||||
(port machine-ssh-configuration-port ; integer
|
||||
(default 22))
|
||||
(user machine-ssh-configuration-user ; string
|
||||
(default "root"))
|
||||
(identity machine-ssh-configuration-identity ; path to a private key
|
||||
(default #f))
|
||||
(session machine-ssh-configuration-session ; session
|
||||
(default #f)))
|
||||
(host-name machine-ssh-configuration-host-name) ; string
|
||||
(build-locally? machine-ssh-configuration-build-locally?
|
||||
(default #t))
|
||||
(port machine-ssh-configuration-port ; integer
|
||||
(default 22))
|
||||
(user machine-ssh-configuration-user ; string
|
||||
(default "root"))
|
||||
(identity machine-ssh-configuration-identity ; path to a private key
|
||||
(default #f))
|
||||
(session machine-ssh-configuration-session ; session
|
||||
(default #f)))
|
||||
|
||||
(define (machine-ssh-session machine)
|
||||
"Return the SSH session that was given in MACHINE's configuration, or create
|
||||
|
@ -100,7 +103,10 @@ (define (managed-host-remote-eval machine exp)
|
|||
"Internal implementation of 'machine-remote-eval' for MACHINE instances with
|
||||
an environment type of 'managed-host."
|
||||
(maybe-raise-unsupported-configuration-error machine)
|
||||
(remote-eval exp (machine-ssh-session machine)))
|
||||
(remote-eval exp (machine-ssh-session machine)
|
||||
#:build-locally?
|
||||
(machine-ssh-configuration-build-locally?
|
||||
(machine-configuration machine))))
|
||||
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Reference in a new issue