summaryrefslogtreecommitdiff
path: root/gnu/services/networking.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-04-16 00:06:43 +0200
committerLudovic Courtès <ludo@gnu.org>2017-04-16 00:48:08 +0200
commit3d3c56500843b5573ba6419db5e66075fb8ac8ef (patch)
treea5daaafdeafde92cb4a8295538d6dfe3d56fa264 /gnu/services/networking.scm
parent1bb895eabf74a1e571887eb1521915e668a5c28d (diff)
services: Add a default value to various service types.
* gnu/services/admin.scm (rottlog-service-type)[default-value]: New field. * gnu/services/base.scm (guix-service-type)[default-value]: New field. (guix-publish-service-type)[default-value]: New field. * gnu/services/cups.scm (cups-service-type)[default-value]: New field. * gnu/services/dict.scm (dicod-service-type)[default-value]: New field. * gnu/services/mcron.scm (mcron-service-type)[default-value]: New field. * gnu/services/networking.scm (<tor-configuration>)[config-file]: Add default value. (tor-service-type)[default-value]: New field. (<bitlbee-configuration>)[interface, port, extra-settings]: Add default values. (bitlbee-service-type)[default-value]: New field. (wpa-supplicant-service-type)[default-value]: New field. (tlp-service-type)[default-value]: New field. (openssh-service-type)[default-value]: New field. * doc/guix.texi (Base Services, Log Rotation) (Networking Services, Printing Services): (Power management Services): Adjust examples accordingly.
Diffstat (limited to 'gnu/services/networking.scm')
-rw-r--r--gnu/services/networking.scm21
1 files changed, 14 insertions, 7 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index ae9b8f87cc..99a3d493c5 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -529,7 +529,8 @@ make an initial adjustment of more than 1,000 seconds."
tor-configuration?
(tor tor-configuration-tor
(default tor))
- (config-file tor-configuration-config-file)
+ (config-file tor-configuration-config-file
+ (default (plain-file "empty" "")))
(hidden-services tor-configuration-hidden-services
(default '())))
@@ -666,7 +667,8 @@ HiddenServicePort ~a ~a~%"
(inherit config)
(hidden-services
(append (tor-configuration-hidden-services config)
- services)))))))
+ services)))))
+ (default-value (tor-configuration))))
(define* (tor-service #:optional
(config-file (plain-file "empty" ""))
@@ -719,9 +721,12 @@ project's documentation} for more information."
bitlbee-configuration?
(bitlbee bitlbee-configuration-bitlbee
(default bitlbee))
- (interface bitlbee-configuration-interface)
- (port bitlbee-configuration-port)
- (extra-settings bitlbee-configuration-extra-settings))
+ (interface bitlbee-configuration-interface
+ (default "127.0.0.1"))
+ (port bitlbee-configuration-port
+ (default 6667))
+ (extra-settings bitlbee-configuration-extra-settings
+ (default "")))
(define bitlbee-shepherd-service
(match-lambda
@@ -789,7 +794,8 @@ project's documentation} for more information."
(service-extension account-service-type
(const %bitlbee-accounts))
(service-extension activation-service-type
- (const %bitlbee-activation))))))
+ (const %bitlbee-activation))))
+ (default-value (bitlbee-configuration))))
(define* (bitlbee-service #:key (bitlbee bitlbee)
(interface "127.0.0.1") (port 6667)
@@ -1002,7 +1008,8 @@ dns=" dns "
(list (service-extension shepherd-root-service-type
wpa-supplicant-shepherd-service)
(service-extension dbus-root-service-type list)
- (service-extension profile-service-type list)))))
+ (service-extension profile-service-type list)))
+ (default-value wpa-supplicant)))
;;;