aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-05-29 17:30:58 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-06-14 21:51:44 +0300
commit87cf2a859d62aa24dda8ced7b04f54a3ee9c466c (patch)
tree4bf6bfe860375011d29ce510c37cc046a1c0913b /gnu
parentf8cf3982ff37ca229c9f7928c778ea1fa115416a (diff)
downloadguix-87cf2a859d62aa24dda8ced7b04f54a3ee9c466c.tar.gz
guix-87cf2a859d62aa24dda8ced7b04f54a3ee9c466c.zip
home: services: ssh: Allow unset boolean options in ssh-config.
From man 5 ssh_config: Unless noted otherwise, for each parameter, the first obtained value will be used. We want to allow falling through to the first explicitly chosen user defined value. * gnu/home/services.ssh.scm (define-maybe boolean): New configuration. (openssh-host)[forward-x11?, forward-x11-trusted?, forward-agent?, compression?]: Replace default value with maybe-boolean. * doc/guix.texi (Secure Shell): Update documentation to match the changes in the code.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/home/services/ssh.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm
index 2e841596e4..ac72129b6c 100644
--- a/gnu/home/services/ssh.scm
+++ b/gnu/home/services/ssh.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -118,6 +119,8 @@
(string-append " " (serialize-field-name field) " "
(number->string value) "\n"))
+(define-maybe boolean)
+
(define (serialize-boolean field value)
(string-append " " (serialize-field-name field) " "
(if value "yes" "no") "\n"))
@@ -235,19 +238,19 @@ Additionally, the field can be left unset to allow any address family.")
maybe-string
"User name on the remote host.")
(forward-x11?
- (boolean #f)
+ maybe-boolean
"Whether to forward remote client connections to the local X11 graphical
display.")
(forward-x11-trusted?
- (boolean #f)
+ maybe-boolean
"Whether remote X11 clients have full access to the original X11 graphical
display.")
(forward-agent?
- (boolean #f)
+ maybe-boolean
"Whether the authentication agent (if any) is forwarded to the remote
machine.")
(compression?
- (boolean #f)
+ maybe-boolean
"Whether to compress data in transit.")
(proxy-command
maybe-string