From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQZZM-0001NJ-C3 for guix-patches@gnu.org; Sat, 24 Nov 2018 10:10:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQZZL-0007qm-IR for guix-patches@gnu.org; Sat, 24 Nov 2018 10:10:04 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:41487) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gQZZL-0007qi-FG for guix-patches@gnu.org; Sat, 24 Nov 2018 10:10:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gQZZL-0003FN-5e for guix-patches@gnu.org; Sat, 24 Nov 2018 10:10:03 -0500 Subject: [bug#33486] [PATCH] services: openssh: Install OpenSSH in the system profile. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQZYr-0001Mq-F5 for guix-patches@gnu.org; Sat, 24 Nov 2018 10:09:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQZYq-0007d2-MT for guix-patches@gnu.org; Sat, 24 Nov 2018 10:09:33 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 24 Nov 2018 16:09:23 +0100 Message-Id: <20181124150923.15959-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33486@debbugs.gnu.org This ensures one can scp to or from the GuixSD machine that uses the service. * gnu/services/ssh.scm (openssh-service-type)[extensions]: Add PROFILE-SERVICE-TYPE extension. * gnu/system/examples/bare-bones.tmpl : Remove OPENSSH. * doc/guix.texi (Using the Configuration System): Adjust accordingly. --- doc/guix.texi | 6 +++--- gnu/services/ssh.scm | 10 +++++++++- gnu/system/examples/bare-bones.tmpl | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a2af1e9cbd..917a3e9d57 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9727,9 +9727,9 @@ environment variable---in addition to the per-user profiles provides all the tools one would expect for basic user and administrator tasks---including the GNU Core Utilities, the GNU Networking Utilities, the GNU Zile lightweight text editor, @command{find}, @command{grep}, -etc. The example above adds GNU@tie{}Screen and OpenSSH to those, -taken from the @code{(gnu packages screen)} and @code{(gnu packages ssh)} -modules (@pxref{Package Modules}). The +etc. The example above adds GNU@tie{}Screen to those, +taken from the @code{(gnu packages screen)} +module (@pxref{Package Modules}). The @code{(list package output)} syntax can be used to add a specific output of a package: diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 056602248f..bb94c5f41a 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -518,7 +518,15 @@ of user-name/file-like tuples." (service-extension activation-service-type openssh-activation) (service-extension account-service-type - (const %openssh-accounts)))) + (const %openssh-accounts)) + + ;; Install OpenSSH in the system profile. That way, + ;; 'scp' is found when someone tries to copy to or from + ;; this machine. + (service-extension profile-service-type + (lambda (config) + (list (openssh-configuration-openssh + config)))))) (compose concatenate) (extend extend-openssh-authorized-keys) (default-value (openssh-configuration)))) diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl index 889dcabe64..902dacbe57 100644 --- a/gnu/system/examples/bare-bones.tmpl +++ b/gnu/system/examples/bare-bones.tmpl @@ -3,7 +3,7 @@ (use-modules (gnu)) (use-service-modules networking ssh) -(use-package-modules screen ssh) +(use-package-modules screen) (operating-system (host-name "komputilo") @@ -40,7 +40,7 @@ %base-user-accounts)) ;; Globally-installed packages. - (packages (cons* screen openssh %base-packages)) + (packages (cons screen %base-packages)) ;; Add services to the baseline: a DHCP client and ;; an SSH server. -- 2.19.1