diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-04-30 14:07:34 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-04-30 14:22:43 +0200 |
commit | 5986e94118b114319feadbd2431d6efbf870a5e5 (patch) | |
tree | d5243b32f4a8a3bf0194844c507d9962398d1c72 /gnu/services/base.scm | |
parent | 6ac8b7359a1ac80e558f41dd37004ffa727dd3c6 (diff) | |
download | patches-5986e94118b114319feadbd2431d6efbf870a5e5.tar patches-5986e94118b114319feadbd2431d6efbf870a5e5.tar.gz |
services: gpm: Provide a default value and document 'gpm-service-type'.
* gnu/services/base.scm (%default-gpm-options): New variable.
(<gpm-configuration>)[gpm, options]: Add default values.
(gpm-service-type)[default-value]: New field.
(gpm-service): Use %DEFAULT-GPM-OPTIONS and mark as deprecated.
* doc/guix.texi (Base Services): Document 'gpm-service-type' and
'gpm-configuration'. Remove 'gpm-service'.
Diffstat (limited to 'gnu/services/base.scm')
-rw-r--r-- | gnu/services/base.scm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 694aab882e..eb82b2ddcf 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1962,10 +1962,16 @@ extra rules from the packages listed in @var{rules}." "Return a service that uses @var{device} as a swap device." (service swap-service-type device)) +(define %default-gpm-options + ;; Default options for GPM. + '("-m" "/dev/input/mice" "-t" "ps2")) + (define-record-type* <gpm-configuration> gpm-configuration make-gpm-configuration gpm-configuration? - (gpm gpm-configuration-gpm) ;package - (options gpm-configuration-options)) ;list of strings + (gpm gpm-configuration-gpm ;package + (default gpm)) + (options gpm-configuration-options ;list of strings + (default %default-gpm-options))) (define gpm-shepherd-service (match-lambda @@ -2000,14 +2006,15 @@ extra rules from the packages listed in @var{rules}." (extensions (list (service-extension shepherd-root-service-type gpm-shepherd-service))) + (default-value (gpm-configuration)) (description "Run GPM, the general-purpose mouse daemon, with the given command-line options. GPM allows users to use the mouse in the console, notably to select, copy, and paste text. The default options use the @code{ps2} protocol, which works for both USB and PS/2 mice."))) -(define* (gpm-service #:key (gpm gpm) - (options '("-m" "/dev/input/mice" "-t" "ps2"))) +(define* (gpm-service #:key (gpm gpm) ;deprecated + (options %default-gpm-options)) "Run @var{gpm}, the general-purpose mouse daemon, with the given command-line @var{options}. GPM allows users to use the mouse in the console, notably to select, copy, and paste text. The default value of @var{options} |