aboutsummaryrefslogtreecommitdiff
path: root/gnu/home/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-03-16 17:09:46 +0100
committerLudovic Courtès <ludo@gnu.org>2023-03-16 17:09:46 +0100
commitbe7e2bf7ebc10bb4e5808ddeabc4b914f575865f (patch)
tree2add67f72086d8658fc207fc8e075e607499588a /gnu/home/services
parentb9d891140a649804bab63edcac1870450de5536f (diff)
downloadguix-be7e2bf7ebc10bb4e5808ddeabc4b914f575865f.tar
guix-be7e2bf7ebc10bb4e5808ddeabc4b914f575865f.tar.gz
home: services: ssh-agent: Remove host-side use of (shepherd support).
This is a followup to 2c2f382e757d5eef39e8460a20ac75a1b1f8b22e, which inadvertently pulled in (shepherd support) on the host side. * gnu/home/services/ssh.scm (<home-ssh-agent-configuration>)[socket-directory]: Change value to a gexp. (home-ssh-agent-services): Change 'socket-file' and 'command' to a gexp. Add 'modules' field to 'shepherd-service'. * doc/guix.texi (Secure Shell): Adjust accordingly.
Diffstat (limited to 'gnu/home/services')
-rw-r--r--gnu/home/services/ssh.scm17
1 files changed, 8 insertions, 9 deletions
diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm
index 205650d489..2eae08bd86 100644
--- a/gnu/home/services/ssh.scm
+++ b/gnu/home/services/ssh.scm
@@ -31,7 +31,6 @@
#:select (object->camel-case-string))
#:autoload (gnu packages base) (glibc-utf8-locales)
#:use-module (gnu packages ssh)
- #:use-module (shepherd support)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
@@ -271,7 +270,7 @@ client,@command{ssh}, and by other tools such as @command{guix deploy}.")
(openssh home-ssh-agent-openssh ;file-like
(default openssh))
(socket-directory home-ssh-agent-socket-directory ;string
- (default (string-append %user-runtime-dir "/ssh-agent")))
+ (default #~(string-append %user-runtime-dir "/ssh-agent")))
(extra-options home-ssh-agent-extra-options ;list of string
(default '())))
@@ -281,20 +280,20 @@ client,@command{ssh}, and by other tools such as @command{guix deploy}.")
(($ <home-ssh-agent-configuration>
openssh socket-directory extra-options)
(let* ((ssh-agent (file-append openssh "/bin/ssh-agent"))
- (socket-file (string-append socket-directory "/socket"))
- (command `(,ssh-agent
- "-D"
- "-a" ,socket-file
- ,@extra-options))
- (log-file (string-append %user-log-dir "/ssh-agent.log")))
+ (socket-file #~(string-append #$socket-directory "/socket"))
+ (command #~`(#$ssh-agent
+ "-D" "-a" ,#$socket-file
+ #$@extra-options))
+ (log-file #~(string-append %user-log-dir "/ssh-agent.log")))
(list (shepherd-service
(documentation "Run the ssh-agent.")
(provision '(ssh-agent))
+ (modules '((shepherd support))) ;for '%user-runtime-dir', etc.
(start #~(lambda _
(unless (file-exists? #$socket-directory)
(mkdir-p #$socket-directory)
(chmod #$socket-directory #o700))
- (fork+exec-command '#$command #:log-file #$log-file)))
+ (fork+exec-command #$command #:log-file #$log-file)))
(stop #~(make-kill-destructor))))))))
(define home-ssh-agent-service-type