summary refs log tree commit diff
path: root/gnu/home
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/home')
-rw-r--r--gnu/home/services.scm5
-rw-r--r--gnu/home/services/ssh.scm12
2 files changed, 10 insertions, 7 deletions
diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 75ea54743d..99035686f1 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -420,8 +420,9 @@ extended with one gexp.")))
             (he-path (string-append (getenv "HOME") "/.guix-home"))
             (new-home-env (getenv "GUIX_NEW_HOME"))
             (new-home (or new-home-env
-                          ;; Path of the activation file if called interactively
-                          (dirname (car (command-line)))))
+                          ;; Absolute path of the directory of the activation
+                          ;; file if called interactively.
+                          (canonicalize-path (dirname (car (command-line))))))
             (old-home-env (getenv "GUIX_OLD_HOME"))
             (old-home (or old-home-env
                           (if (file-exists? (he-init-file he-path))
diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm
index f0987aee23..d15f5ee912 100644
--- a/gnu/home/services/ssh.scm
+++ b/gnu/home/services/ssh.scm
@@ -69,17 +69,19 @@
                  " " value "\n"))
 
 (define (address-family? obj)
-  (memv obj (list 'unset AF_INET AF_INET6)))
+  (memv obj (list AF_INET AF_INET6)))
+
+(define-maybe address-family)
 
 (define (serialize-address-family field family)
-  (if (eq? 'unset family)
-      ""
+  (if (maybe-value-set? family)
       (string-append "  " (serialize-field-name field) " "
                      (cond ((= family AF_INET) "inet")
                            ((= family AF_INET6) "inet6")
                            ;; The 'else' branch is unreachable.
                            (else (raise (condition (&error)))))
-                     "\n")))
+                     "\n")
+      ""))
 
 (define (natural-number? obj)
   (and (integer? obj) (exact? obj) (> obj 0)))
@@ -115,7 +117,7 @@
    maybe-string
    "Host name---e.g., @code{\"foo.example.org\"} or @code{\"192.168.1.2\"}.")
   (address-family
-   address-family
+   maybe-address-family
    "Address family to use when connecting to this host: one of
 @code{AF_INET} (for IPv4 only), @code{AF_INET6} (for IPv6 only).
 Additionally, the field can be left unset to allow any address family.")