gnu: Add r-flowsom.
[jackhill/guix/guix.git] / guix / store / ssh.scm
CommitLineData
285f63e8
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (guix store ssh)
20 #:use-module (guix ssh)
21 #:use-module (web uri)
22 #:export (connect-to-daemon))
23
24;;; Commentary:
25;;;
26;;; This modules provides the entry point for 'open-connection' in (guix
27;;; store). Passing an 'ssh://' URI to 'open-connection' triggers the use of
28;;; the code in this module.
29;;;
30;;; End:
31
32(define (connect-to-daemon uri)
33 "Connect to the SSH daemon at URI, a URI object with the 'ssh' scheme."
34 (remote-daemon-channel
35 (open-ssh-session (uri-host uri)
36 #:port (or (uri-port uri) 22)
37 #:user (uri-userinfo uri))))
38
39;;; ssh.scm ends here