Previous: , Up: Services   [Contents][Index]


6.2.7.17 Miscellaneous Services

Lirc Service

The (gnu services lirc) module provides the following service.

Scheme Procedure: lirc-service [#:lirc lirc] [#:device #f] [#:driver #f] [#:config-file #f] [#:extra-options '()]

Return a service that runs LIRC, a daemon that decodes infrared signals from remote controls.

Optionally, device, driver and config-file (configuration file name) may be specified. See lircd manual for details.

Finally, extra-options is a list of additional command-line options passed to lircd.

Spice Service

The (gnu services spice) module provides the following service.

Scheme Procedure: spice-vdagent-service [#:spice-vdagent]

Returns a service that runs VDAGENT, a daemon that enables sharing the clipboard with a vm and setting the guest display resolution when the graphical console window resizes.

6.2.7.18 Dictionary Services

The (gnu services dict) module provides the following service:

Scheme Procedure: dicod-service [#:config (dicod-configuration)]

Return a service that runs the dicod daemon, an implementation of DICT server (see Dicod in GNU Dico Manual).

The optional config argument specifies the configuration for dicod, which should be a <dicod-configuration> object, by default it serves the GNU Collaborative International Dictonary of English.

You can add open localhost to your ~/.dico file to make localhost the default server for dico client (see Initialization File in GNU Dico Manual).

Data Type: dicod-configuration

Data type representing the configuration of dicod.

dico (default: dico)

Package object of the GNU Dico dictionary server.

interfaces (default: ’("localhost"))

This is the list of IP addresses and ports and possibly socket file names to listen to (see listen directive in GNU Dico Manual).

handlers (default: ’())

List of <dicod-handler> objects denoting handlers (module instances).

databases (default: (list %dicod-database:gcide))

List of <dicod-database> objects denoting dictionaries to be served.

Data Type: dicod-handler

Data type representing a dictionary handler (module instance).

name

Name of the handler (module instance).

module (default: #f)

Name of the dicod module of the handler (instance). If it is #f, the module has the same name as the handler. (see Modules in GNU Dico Manual).

options

List of strings or gexps representing the arguments for the module handler

Data Type: dicod-database

Data type representing a dictionary database.

name

Name of the database, will be used in DICT commands.

handler

Name of the dicod handler (module instance) used by this database (see Handlers in GNU Dico Manual).

complex? (default: #f)

Whether the database configuration complex. The complex configuration will need a corresponding <dicod-handler> object, otherwise not.

options

List of strings or gexps representing the arguments for the database (see Databases in GNU Dico Manual).

Scheme Variable: %dicod-database:gcide

A <dicod-database> object serving the GNU Collaborative International Dictionary of English using the gcide package.

The following is an example dicod-service configuration.

(dicod-service #:config
  (dicod-configuration
   (handlers (list (dicod-handler
                    (name "wordnet")
                    (module "dictorg")
                    (options
                     (list #~(string-append "dbdir=" #$wordnet))))))
   (databases (list (dicod-database
                     (name "wordnet")
                     (complex? #t)
                     (handler "wordnet")
                     (options '("database=wn")))
                    %dicod-database:gcide))))

6.2.7.19 Version Control

The (gnu services version-control) module provides the following services:

Git daemon service

Scheme Procedure: git-daemon-service [#:config (git-daemon-configuration)]

Return a service that runs git daemon, a simple TCP server to expose repositories over the Git protocol for anonymous access.

The optional config argument should be a <git-daemon-configuration> object, by default it allows read-only access to exported24 repositories under /srv/git.

Data Type: git-daemon-configuration

Data type representing the configuration for git-daemon-service.

package (default: git)

Package object of the Git distributed version control system.

export-all? (default: #f)

Whether to allow access for all Git repositories, even if they do not have the git-daemon-export-ok file.

base-path (default: /srv/git)

Whether to remap all the path requests as relative to the given path. If you run git daemon with (base-path "/srv/git") on example.com, then if you later try to pull git://example.com/hello.git, git daemon will interpret the path as /srv/git/hello.git.

user-path (default: #f)

Whether to allow ~user notation to be used in requests. When specified with empty string, requests to git://host/~alice/foo is taken as a request to access foo repository in the home directory of user alice. If (user-path "path") is specified, the same request is taken as a request to access path/foo repository in the home directory of user alice.

listen (default: ’())

Whether to listen on specific IP addresses or hostnames, defaults to all.

port (default: #f)

Whether to listen on an alternative port, which defaults to 9418.

whitelist (default: ’())

If not empty, only allow access to this list of directories.

extra-options (default: ’())

Extra options will be passed to git daemon, please run man git-daemon for more information.


Footnotes

(24)

By creating the magic file "git-daemon-export-ok" in the repository directory.


Previous: , Up: Services   [Contents][Index]