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


6.2.7.24 Miscellaneous Services

System Control Service

The (gnu services sysctl) provides a service to configure kernel parameters at boot.

Scheme Variable: sysctl-service-type

The service type for sysctl, which modifies kernel parameters under /proc/sys/. To enable IPv4 forwarding, it can be instantiated as:

(service sysctl-service-type
         (sysctl-configuration
           (settings '(("net.ipv4.ip_forward" . "1")))))
Data Type: sysctl-configuration

The data type representing the configuration of sysctl.

sysctl (default: (file-append procps "/sbin/sysctl")

The sysctl executable to use.

settings (default: '())

An association list specifies kernel parameters and their values.

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.25 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))))

Cgit Service

Cgit is a web frontend for Git repositories written in C.

The following example will configure the service with default values. By default, Cgit can be accessed on port 80 (http://localhost:80).

(service nginx-service-type)
(service fcgiwrap-service-type)
(service cgit-service-type)
Data Type: cgit-configuration

Data type representing the configuration of Cgit. This type has the following parameters:

config-file (default: (cgit-configuration-file))

The configuration file to use for Cgit. This can be set to a cgit-configuration-file record value, or any gexp (see G-Expressions).

For example, to instead use a local file, the local-file function can be used:

(service cgit-service-type
         (cgit-configuration
           (config-file (local-file "./my-cgitrc.conf"))))
package (default: cgit)

The Cgit package to use.

Data Type: cgit-configuration-file

Data type representing the configuration options for Cgit. This type has the following parameters:

css (default: "/share/cgit/cgit.css")

URL which specifies the css document to include in all Cgit pages.

logo (default: "/share/cgit/cgit.png")

URL which specifies the source of an image which will be used as a logo on all Cgit pages.

virtual-root (default: "/")

URL which, if specified, will be used as root for all Cgit links.

repository-directory (default: "/srv/git")

Name of the directory to scan for repositories.

robots (default: (list "noindex" "nofollow"))

Text used as content for the “robots” meta-tag.


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