From 2c8e04f13670c8c7ad8c7195c305960dd1905363 Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Fri, 9 Aug 2019 14:24:57 -0400 Subject: remote: Build derivations appropriate for the remote's * gnu/machine/ssh.scm (machine-ssh-configuration): Add 'system' field. (managed-host-remote-eval): Pass 'system' field to 'remote-eval'. (machine-check-building-for-appropriate-system): New variable. (check-deployment-sanity): Add call to 'machine-check-building-for-appropriate-system'. * doc/guix.texi (Invoking guix deploy): Describe new 'system' field. * guix/ssh.scm (remote-system): New variable. * guix/remote.scm (remote-eval): Use result of 'remote-system' when lowering the G-Expression. (remote-eval): Add 'system' keyword argument. (trampoline): Return a rather than a . --- guix/ssh.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'guix/ssh.scm') diff --git a/guix/ssh.scm b/guix/ssh.scm index ede00133c8..9b5ca68894 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -39,6 +39,7 @@ remote-inferior remote-daemon-channel connect-to-remote-daemon + remote-system send-files retrieve-files retrieve-files* @@ -282,6 +283,12 @@ be read. When RECURSIVE? is true, the closure of FILES is exported." ,(object->string (object->string export)))))) +(define (remote-system session) + "Return the system type as expected by Nix, usually ARCHITECTURE-KERNEL, of +the machine on the other end of SESSION." + (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-system)) + session)) + (define* (send-files local files remote #:key recursive? -- cgit v1.2.3