Commit Graph

213 Commits

Author SHA1 Message Date
Hartmut Goebel 0af94ad52f
gnu: service: Update comment.
* gnu/services/base.scm (guix-activation): Update comment.
2017-11-08 18:23:06 +01:00
Maxim Cournoyer 6e644cfdb3
services: base: Add file->udev-rule function.
This function allows passing a file-like object to the udev service.

* gnu/services/base.scm (file->udev-rule): New function.
* doc/guix.texi (Base Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-10-22 22:09:00 -07:00
Ludovic Courtès 1c65cca574
file-systems: 'mount-file-system' now takes a <file-system> object.
* gnu/build/file-systems.scm (mount-file-system): Rename 'spec' to 'fs'
and assume it's a <file-system>.
* gnu/build/linux-boot.scm (boot-system): Assume MOUNTS is a list of
<file-system> and adjust accordingly.
* gnu/build/linux-container.scm (mount-file-systems): Remove
'file-system->spec' call.
* gnu/services/base.scm (file-system-shepherd-service): Add
'spec->file-system' call.  Add (gnu system file-systems) to 'modules'.
* gnu/system/linux-initrd.scm (raw-initrd): Use (gnu system
file-systems).  Add 'spec->file-system' call for #:mounts.
2017-10-11 11:12:33 +02:00
Ludovic Courtès fbc31dc124
services: Move 'session-environment-service-type' to pam.scm.
* gnu/services/base.scm (environment-variables->environment-file)
(session-environment-service-type)
(session-environment-service): Move to...
* gnu/system/pam.scm: ... here.
2017-09-22 00:05:08 +02:00
Ludovic Courtès 6b9e1fefa4
services: base: Add descriptions.
* gnu/services/base.scm (fstab-service-type)
(file-system-service-type, urandom-seed-service-type)
(session-environment-service-type)
(console-font-service-type)
(login-service-type, agetty-service-type)
(mingetty-service-type, nscd-service-type)
(pam-limits-service-type, guix-service-type)
(guix-publish-service-type, udev-service-type)
(gpm-service-type): Add 'description' field.
* po/packages/POTFILES.in: Add gnu/services/base.scm.
2017-09-16 17:47:46 +02:00
Ludovic Courtès d1ff5f9db3
services: file-system: Use 'file-system->spec'.
* gnu/services/base.scm (file-system-shepherd-service): Use
'file-system->spec' instead of in-line code.
2017-09-11 22:24:46 +02:00
Ludovic Courtès 943e1b975f
services: base: Import the closure of (gnu build file-systems).
* gnu/services/base.scm (file-system-shepherd-service): Use
'source-module-closure' in the 'with-imported-modules' form.
2017-09-11 22:24:46 +02:00
Ludovic Courtès 7f090203d5
services: user-processes: Reap child processes.
Fixes <http://bugs.gnu.org/26931>.
Reported by Leo Famulari <leo@famulari.name>.

* gnu/services/base.scm (user-processes-service-type)[stop]: Add
'reap-children' loop.
* gnu/tests/base.scm (run-halt-test): New procedure.
(%test-halt): New variable.
2017-08-28 09:56:33 +02:00
Andy Wingo b6d8066d4d
gnu: services: Log debug messages to /var/log/debug.
* gnu/services/base.scm (%default-syslog.conf): Create a /var/log/debug with
  messages logged to syslog at debug level.
2017-08-25 16:01:56 +02:00
Ludovic Courtès 412701b0e5
services: guix-publish: Run in a UTF-8 locale.
Works around <https://bugs.gnu.org/26948>.

* gnu/services/base.scm (guix-publish-shepherd-service): Pass
  #:environment-variables to 'make-forkexec-constructor'.
2017-07-27 14:51:03 +02:00
Ludovic Courtès 3bee4b6196
services: guix: Add 'max-silent-time' and 'timeout'.
* gnu/services/base.scm (<guix-configuration>)[max-silent-time]
[timeout]: New fields.
(guix-shepherd-service): Honor them.
* doc/guix.texi (Base Services): Document them.
2017-06-05 01:42:38 +02:00
Ludovic Courtès c22c9fa589
services: guix: Authorize the key for bayfront.guixsd.org.
* gnu/services/base.scm (%default-authorized-guix-keys): Add
"bayfront.guixsd.org".
2017-05-15 23:55:10 +02:00
Ludovic Courtès c298fb133a
services: nscd: Adjust activation snippet for /etc/resolv.conf symlinks.
Fixes <http://bugs.gnu.org/26809>.
Reported by Mark H Weaver <mhw@netris.org>.

* gnu/services/base.scm (nscd-activation): Use 'lstat' instead of
'file-exists?'.
2017-05-08 16:29:23 +02:00
Ludovic Courtès 49f9d7f697
services: nscd: Create /etc/resolv.conf if it does not exist.
* gnu/services/base.scm (nscd-activation): Create /etc/resolv.conf if it
does not exist yet.
2017-05-02 12:32:52 +02:00
Ludovic Courtès a35136cb56
services: guix-publish: Add 'cache', 'workers', and 'ttl' config knobs.
* gnu/services/base.scm (<guix-publish-configuration>)[cache, workers,
ttl]: New fields.
(guix-publish-shepherd-service): Honor them.
(guix-publish-activation): New procedure.
(guix-publish-service-type): Extend ACTIVATION-SERVICE-TYPE.
* doc/guix.texi (Base Services): Document it.
2017-04-19 17:51:39 +02:00
Ludovic Courtès f2767d3e89
services: guix-publish: Fix getter names.
Fixes a typo introduced in 697ddb8850.

* gnu/services/base.scm (<guix-publish-configuration>): Add missing
'configuration' word in getters for 'compression-level' and 'nar-path'.
2017-04-19 17:51:39 +02:00
Ludovic Courtès 3d3c565008
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.
2017-04-16 00:48:08 +02:00
Ludovic Courtès 697ddb8850
services: guix-publish: Add 'compression-level' and 'nar-path' fields.
* gnu/services/base.scm (<guix-publish-configuration>)[compression-level,
nar-path]: New fields.
(guix-publish-shepherd-service): Honor them.
* doc/guix.texi (Base Services): Document them.
2017-03-24 00:23:29 +01:00
Ludovic Courtès f1e900a3b8
doc: Document 'guix-publish-service-type' instead of 'guix-publish-service'.
* doc/guix.texi (Base Services): Document 'guix-publish-service-type'
and 'guix-configuration'.  Remove 'guix-publish-service'.
(Invoking guix publish): Mention 'guix-publish-service-type'.
* gnu/services/base.scm (guix-publish-service): Mark as deprecated.
(<guix-configuration>): Export getters.
2017-03-24 00:23:29 +01:00
Ludovic Courtès 278d486b0c
file-systems: Do not use (gnu packages …).
Fixes a regression introduced in
7208995426 whereby (gnu system
file-systems) would pull in (gnu packages …) module, which in turn
breaks when importing things like (gnu build shepherd).

* gnu/system/file-systems.scm (file-system-type-predicate): Export.
(file-system-packages): Move to...
* gnu/system/linux-initrd.scm (file-system-packages): ... here.  Add
docstring.
* gnu/services/base.scm: Use it.
* tests/file-systems.scm ("does not pull (gnu packages …)"): New test.
2017-03-21 22:33:07 +01:00
Danny Milosavljevic 9970ef6134
services: Remove Tab character from source code whitespace.
* gnu/services/base.scm (file-system-shepherd-service): Remove Tab character
from source code whitespace.
2017-03-19 21:36:55 +01:00
Danny Milosavljevic 26e34e1e12
services: file-system-shepherd-service: Make it find the fsck programs.
Fixes <https://bugs.gnu.org/25917>.

* gnu/services/base.scm (file-system-shepherd-service): Use
file-system-packages.
2017-03-19 18:49:30 +01:00
Leo Famulari 9ee4c9ab6f
services: Add agetty service.
* gnu/services/base.scm (<agetty-configuration>): New record type.
(agetty-shepherd-service, agetty-service): New procedures.
(agetty-service-type): New variable.
* doc/guix.texi (Base Services): Document it.
[mingetty-configuration],[kmscon-configuration]: Specify the types of
supported consoles.
2017-03-05 03:41:32 -05:00
Leo Famulari b191f0a6c5
services: guix: Support building in a directory besides '/tmp'.
* gnu/services/base.scm (<guix-configuration>)[tmpdir]: New field.
(guix-shepherd-service): Use 'tmpdir' in #:environment-variables.
* doc/guix.texi (Base Services)[guix-configuration]: Document it.
2017-02-23 13:03:14 -05:00
Leo Famulari 93d32da9f8
services: guix: Support using an HTTP proxy.
* gnu/services/base.scm (<guix-configuration>)[http-proxy]: New field.
(guix-shepherd-service): Use 'http-proxy' in #:environment-variables.
* doc/guix.texi (Base Services)[guix-configuration]: Document it.
2017-02-22 15:25:55 -05:00
Ludovic Courtès 387e175492
services: Add 'special-files-service-type'.
* gnu/build/activation.scm (activate-/bin/sh): Remove.
(activate-special-files): New procedure.
* gnu/services.scm (activation-script): Remove call to
'activate-/bin/sh'.
(special-files-service-type): New variable.
(extra-special-file): New procedure.
* gnu/services/base.scm (%base-services): Add SPECIAL-FILES-SERVICE-TYPE
instance.
* gnu/tests/base.scm (run-basic-test)[special-files]: New variables.
["special files"]: New test.
2017-02-08 16:17:05 +01:00
Ludovic Courtès 8de3e4b35f
services: Make 'static-networking' extensible.
This allows users to statically define several interfaces.

* gnu/services/networking.scm (<static-networking>)[provision]
[name-servers]: Add default values.
(static-networking-shepherd-service)
(static-networking-etc-files)
(static-networking-shepherd-services): New procedures.
(static-networking-service-type): Change to extend both
SHEPHERD-ROOT-SERVICE-TYPE and ETC-SERVICE-TYPE.
(static-networking-service): Remove default value of #:provision.
Implement using 'simple-service'.
* gnu/services/base.scm (%base-services): Replace
'static-networking-service' call with 'service' form.
* doc/guix.texi (Networking Services): Update documentation.
2017-02-01 23:53:35 +01:00
Ludovic Courtès a43aca973e
system: Introduce 'file-systems' Shepherd service.
* gnu/services/base.scm (file-system-shepherd-services): New procedure.
(file-system-service-type): Use it as the SHEPHERD-ROOT-SERVICE-TYPE
extension.
(user-processes-service-type): Change to take a single 'grace-delay'
parameter.
(user-processes-service): Remove 'file-systems' parameter.  Pass
GRACE-DELAY as the only value for the service.
* gnu/system.scm (essential-services): Adjust accordingly.
2017-01-31 23:21:59 +01:00
Mathieu Othacehe 70dfa4e07a
services: Export guix-configuration getters.
* gnu/services/base.scm (guix-configuration-*): Export.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-25 19:04:21 +01:00
Ludovic Courtès dc0ef095b3
services: guix: Add 'log-file' configuration option.
* gnu/services/base.scm (<guix-configuration>)[log-file]: New field.
(guix-shepherd-service): Pass #:log-file to 'make-forkexec-constructor'.
* gnu/services/admin.scm (simple-rotation-config): Take a list of
files and join them with commas.
(%default-rotations): Add /var/log/guix-daemon.log.
* doc/guix.texi (Base Services): Document it.
2016-12-19 23:57:20 +01:00
Ludovic Courtès f78903f363
services: guix: Remove dependency on lsh.
* gnu/services/base.scm (<guix-configuration>)[lsh]: Remove.
(guix-shepherd-service): Remove lsh from 'PATH'.
* doc/guix.texi (Base Services): Adjust accordingly.
2016-12-19 23:57:19 +01:00
Ludovic Courtès 9fc037fe10
services: Use 'file-append' in more places.
* gnu/services/avahi.scm (avahi-shepherd-service): Use #$(file-append x y)
instead of (string-append #$x y).
* gnu/services/base.scm (unicode-start)
(console-keymap-service-type, console-font-shepherd-services)
(mingetty-shepherd-service, nscd-shepherd-service)
(hydra-key-authorization, guix-shepherd-service)
(guix-publish-shepherd-service, udev-shepherd-service)
(gpm-shepherd-service, <kmscon-configuration>)
(kmscon-service-type): Likewise.
* gnu/services/shepherd.scm (shepherd-boot-gexp): Likewise.
2016-12-19 17:51:00 +01:00
Ludovic Courtès 9328eafbf5
services: file-system: Make sure fsck.* commands are in $PATH.
Fixes a regression introduced in
bf7ef1bb84, whereby the fsck.* commands
would not be found.

* gnu/services/base.scm (file-system-shepherd-service): Call calls to
'setenv'.
2016-12-05 20:54:59 +01:00
John Darrington bf7ef1bb84
gnu: file-system-shepherd-service: Use mount-file-system.
* gnu/services/base.scm (file-system-shepherd-service): Use
  mount-file-system instead of manually mounting the file system.
2016-12-02 17:43:30 +01:00
Ludovic Courtès 4a84a48742
services: console-font: A single service handles all the VTs.
* gnu/services/base.scm (%default-console-font): New variable.
(console-font-shepherd-services): New procedure.
(console-font-service-type): Change to use 'service-type'.
(console-font-service): Rewrite using 'simple-service'.
(%base-services): Use a single CONSOLE-FONT-SERVICE-TYPE instance.
* gnu/system/install.scm (installation-services): Likewise.
2016-09-19 23:36:17 +09:00
David Craven 46ec2707a4
services: Add kmscon service.
* gnu/services/base.scm (<kmscon-configuration>, kmscon-service-type):
  New variables.
* doc/guix.texi (@deffn kmscon-service-type, @deftp
  kmscon-configuration): Add documentation.
2016-09-11 16:29:45 +02:00
David Craven 317d3b474a
services: Add login-service.
* gnu/services/base.scm (%default-motd, <login-configuration>,
  login-pam-service, login-serivce-type, login-service): New variables.
  (<mingetty-configuration>, mingetty-shepherd-service,
  mingetty-serivce-type): Remove motd. Remove allow-empty-passwords?.
  Remove mingetty-pam-service.
  (%base-services): Add login-service. Remove motd.
2016-09-11 16:29:45 +02:00
Ludovic Courtès 9e41130b14
system: Use 'file-append' to denote file names.
* gnu/services/avahi.scm, gnu/services/base.scm,
gnu/services/databases.scm, gnu/services/dbus.scm,
gnu/services/desktop.scm, gnu/services/dict.scm,
gnu/services/mail.scm, gnu/services/networking.scm,
gnu/services/sddm.scm, gnu/services/spice.scm,
gnu/services/ssh.scm, gnu/services/web.scm,
gnu/services/xorg.scm, gnu/system.scm: Replace the
 #~(string-append #$pkg "/bin/foo") idiom with
 (file-append pkg "/bin/foo").
2016-09-10 13:10:06 +02:00
Ludovic Courtès afa54a38b7
services: syslog: Use a PID file.
* gnu/services/base.scm (syslog-service-type)[start]: Remove --no-detach
and use #:pid-file.
2016-09-07 11:49:48 +02:00
David Craven ec2e2f6ce2
services: syslog: Use syslog-configuration.
* gnu/services/base.scm (<syslog-configuration>): New variable.
  (syslog-service-type): Use <syslog-configuration>.
  (syslog-service): Use <syslog-configuration>.
* gnu/tests/base.scm (%avahi-os): Use <syslog-configuration>.
* doc/guix.texi (syslog-configuration-type): Add @deftp.
  (syslog-service): Update @deffn.
2016-09-06 17:48:59 +02:00
Ludovic Courtès aa1145df8d
services: Make a single extensible 'file-systems' service.
Previously we would create one 'file-system-service-type' instead per
file system.  Now, we create only one instance for all the file
systems.

* gnu/services/base.scm (fstab-service-type)[compose]: Change to
CONCATENATE.
(file-system-shepherd-service): Change to return either one
<shepherd-service> or #f.
(file-system-service-type): Pluralize 'name'.  Adjust
SHEPHERD-ROOT-SERVICE-TYPE extension to above changes.  Add 'compose'
and 'extend'.
(file-system-service): Remove.
* gnu/system.scm (other-file-system-services): Rename to...
(non-boot-file-system-service): ... this.  Change to return a single
FILE-SYSTEM-SERVICE-TYPE instance.
(essential-services): Adjust accordingly.
2016-08-22 00:20:48 +02:00
Ludovic Courtès 5b58c28b7e
services: guix: Add 'authorized-keys' configuration knob.
* gnu/services/base.scm (hydra-key-authorization): Add 'key' parameter
and honor it.
(%default-authorized-guix-keys): New variable.
(<guix-configuration>)[authorized-keys]: New field.
(guix-shepherd-service): Adjust 'match' clause accordingly.
(guix-activation): Adjust call to 'hydra-key-authorization'.
* doc/guix.texi (Base Services): Document 'authorized-keys'.
2016-08-19 09:11:00 +02:00
Mark H Weaver 5f4a446d37
services: guix: Fix activation when 'authorize-key?' is false.
* gnu/services/base.scm (guix-activation): Ensure that a gexp is
returned when 'authorize-key?' is false.
2016-08-14 02:48:51 -04:00
Tomáš Čech 24e964314e
services: Export *-service-type and *-configuration.
This allows users to use 'modify-services' and similar constructs for
all these service types.

* gnu/services/avahi.scm: export avahi-configuration.
* gnu/services/base.scm: export gpm-configuration and
rngd-configuration.
* gnu/services/databases.scm: export *-service-type and *-configuration.
* gnu/services/dbus.scm: export dbus-configuration.
* gnu/services/dict.scm: export dicod-service-type.
* gnu/services/lirc.scm: export lirc-configuration and
lirc-service-type.
* gnu/services/mail.scm: export dovecot-service-type.
* gnu/services/web.scm: export nginx-configuration and
nginx-service-type.
* gnu/services/xorg.scm: export screen-locker and screen-locker?.
* gnu/services/ssh.scm: export lsh-configuration and lsh-service-type.
* gnu/services/desktop.scm: export *-service, *-service-type
and *-configuration.
* gnu/services/networking.scm: export *-configuration
and *-service-type.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-07-21 18:53:27 +02:00
Ricardo Wurmus 909147e43f
services: Add pam-limits-service.
* gnu/system/pam.scm (<pam-limits-entry>): New record type.
(pam-limits-entry, pam-limits-entry->string): New procedures.
* gnu/services/base.scm (pam-limits-service-type): New variable.
(pam-limits-service): New procedure.
* doc/guix.texi (Base Services): Document it.
2016-07-19 23:50:03 +02:00
David Craven 2102ae2e30
gnu: lsh: Move to (gnu packages ssh)
* gnu/packages/lsh.scm: Remove.  Move 'lsh and liboop' to...
* gnu/packages/ssh.scm (liboop, lsh): ... here.  New variables.
* gnu/services/ssh.scm, gnu/services/base.scm: Adjust accordingly.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-07-15 17:57:28 +02:00
Ludovic Courtès a91c3fc727
services: <shepherd-service> no longer has an 'imported-modules' field.
* gnu/services/shepherd.scm (<shepherd-service>)[imported-modules]:
Remove.
(%default-imported-modules): Make private.
(shepherd-service-file): Use 'with-imported-modules'.
(shepherd-configuration-file): Remove 'modules' and the calls to
'imported-modules' and 'compiled-modules'.  Use
'with-imported-modules' instead.
* doc/guix.texi (Shepherd Services): Adjust accordingly.
* gnu/services/base.scm (file-system-shepherd-service): Use
'with-imported-modules'.  Remove 'imported-modules' field.
* gnu/system/mapped-devices.scm (device-mapping-service-type): Remove
'imported-modules'.
(open-luks-device): Use 'with-imported-modules'.
* gnu/tests.scm (marionette-shepherd-service): Remove 'imported-modules'
field and use 'with-imported-modules'.
2016-07-12 22:47:08 +02:00
Ludovic Courtès 4ee96a7912
gnu: Switch to 'with-imported-modules'.
* gnu/services.scm (directory-union): Use 'with-imported-modules'
instead of the '#:modules' argument of 'computed-file'.
* gnu/services/base.scm (udev-rules-union): Likewise.
* gnu/services/dbus.scm (system-service-directory): Likewise.
* gnu/services/desktop.scm (wrapped-dbus-service):
(polkit-directory): Likewise.
* gnu/services/networking.scm (tor-configuration->torrc): Likewise.
* gnu/services/xorg.scm (xorg-configuration-directory): Likewise.
* gnu/system/install.scm (self-contained-tarball): Likewise.
* gnu/system/linux-container.scm (container-script): Likewise.
* gnu/system/linux-initrd.scm (expression->initrd): Likewise, and
remove #:modules parameter.
(flat-linux-module-directory): Use 'with-imported-modules'.
(base-initrd): Likewise.
* gnu/system/locale.scm (locale-directory): Likewise.
* gnu/system/shadow.scm (default-skeletons): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
* gnu/tests/base.scm (run-basic-test): Likewise.
* gnu/tests/install.scm (run-install): Likewise.
* doc/guix.texi (Initial RAM Disk): Update 'expression->initrd'
documentation.
2016-07-12 22:47:08 +02:00
David Craven b58cbf9ac5
services: Add rngd-service.
* gnu/services/base.scm (<rngd-configuration>): New record type.
(rngd-service-type): New variable.
(rngd-service): New procedure.
* doc/guix.texi (Base Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-07-05 11:10:01 +02:00
Ludovic Courtès 9009538d84
services: Export more service types.
* gnu/services/base.scm (syslog-service-type): Export.
(urandom-seed-service-type): Export.
2016-06-27 21:41:38 +02:00
Ludovic Courtès 04101d99ee
services: nscd: Wait for the PID file.
* gnu/services/base.scm (nscd-shepherd-service): Pass #:pid-file.
2016-06-27 21:41:38 +02:00
Leo Famulari 71cb237a7d
services: urandom-seed: Refresh seed at boot.
* gnu/services/base.scm (urandom-seed-shepherd-service): Refresh the random
seed unconditionally at boot. Ensure directory structure for %random-seed-file
exists when shutting down.
(%urandom-seed-activation): Remove variable.
(urandom-seed-service-type): Remove deleted variable from list of extensions.
2016-06-05 00:06:26 -04:00
Leo Famulari 8fe5d95e66
services: urandom-seed: Set umask to 077 while shutting down.
* gnu/services/base.scm (urandom-seed-shepherd-service): Call 'umask'.
2016-05-31 00:03:10 -04:00
Leo Famulari a535e12226
services: Add urandom-seed-service.
Fixes <http://bugs.gnu.org/23605>.

* gnu/services/base.scm (urandom-seed-service): New procedure.
(%random-seed-file, urandom-seed-service-type): New variables.
(%urandom-seed-shepherd-service): New procedure.
(%base-services): Call 'urandom-seed-service'.
* doc/guix.texi (Base Services): Document it.
2016-05-28 19:59:31 -04:00
Ludovic Courtès 1ea507bce2 services: Move 'device-mapping-service' to (gnu system mapped-devices).
* gnu/services/base.scm (device-mapping-service-type)
(device-mapping-service): Move to...
* gnu/system/mapped-devices.scm (device-mapping-service-type):
(device-mapping-service): ... here.  New variables.
2016-04-18 01:24:06 +02:00
Ludovic Courtès 060d62a740 system: Add (gnu system mapped-devices).
* gnu/system/file-systems.scm (<mapped-device>, <mapped-device-type>):
Move to...
* gnu/system/mapped-devices.scm: ... here.  New file.
* gnu/system.scm, gnu/services/base.scm,
gnu/system/linux-initrd.scm: Use it.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu.scm (%public-modules): Add it.
2016-04-18 01:24:06 +02:00
Alex Kost b3d05f4870 services: 'console-keymap-service' takes multiple files.
* gnu/services/base.scm (console-keymap-service-type): Type procedure
takes a list of files instead of a single file.
(console-keymap-service): Take 'files' as rest arguments.
* doc/guix.texi (Base Services): Improve documentation of
'console-keymap-service'.
2016-04-17 10:33:08 +03:00
Ludovic Courtès cc7234aede services: nscd: Make respawnable.
* gnu/services/base.scm (nscd-shepherd-service): Remove 'respawn?' field.
2016-03-24 22:47:15 +01:00
Ludovic Courtès 255f730879 gnu: eudev: Add dependency on blkid.
* gnu/packages/linux.scm (eudev)[inputs]: Add UTIL-LINUX.
(eudev-with-blkid): Remove.
* gnu/services/base.scm (udev-service): Use EUDEV instead of
EUDEV-WITH-BLKID.
* gnu/system.scm (%base-packages): Likewise.
2016-03-09 15:26:09 +01:00
Ludovic Courtès 44abcb2868 doc: Mention syslogd configuration.
* gnu/services/base.scm (syslog-service): Add xref to Inetutils in the
docstring.
(%default-syslog.conf): Export.
* doc/guix.texi (Base Services): Update accordingly.
2016-03-04 11:48:52 +01:00
Ludovic Courtès 6eb439070a file-systems: Spawn a Bournish REPL upon fsck failure.
Fixes <http://bugs.gnu.org/22588>.
Reported by Mark H Weaver <mhw@netris.org>.

* gnu/build/file-systems.scm (check-file-system): Pass
%BOURNISH-LANGUAGE as the argument to 'start-repl'.
* gnu/services.scm (activation-script): Add (guix build bournish).
* gnu/services/base.scm (file-system-shepherd-service)[imported-modules]:
Likewise.
* gnu/system/linux-container.scm (container-script): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2016-02-08 23:46:46 +01:00
Ludovic Courtès 400ed6acdd gnu: eudev: Add variant that depends on libblkid.
This fixes a bug whereby /dev/disk/by-{label,id} would be missing on
GuixSD (/dev/disk/by-id would still contain device-mapped partitions
though.)

Reported by Mark H Weaver <mhw@netris.org>.

* gnu/packages/linux.scm (eudev-with-blkid): New variable.
* gnu/services/base.scm (udev-service): #:udev defaults to
EUDEV-WITH-BLKID.
* gnu/system.scm (%base-packages): Replace EUDEV with EUDEV-WITH-BLKID.
2016-02-02 21:16:59 +01:00
Alex Kost d4053c710b services: Rename 'dmd' services to 'shepherd'.
* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service)
  (dmd-service-type, <dmd-service>, dmd-service, dmd-service?)
  (make-dmd-service, dmd-service-documentation, dmd-service-provision)
  (dmd-service-requirement, dmd-service-respawn, dmd-service-start)
  (dmd-service-stop, dmd-service-auto-start?, dmd-service-modules)
  (dmd-service-imported-modules, dmd-service-file-name, dmd-service-file)
  (dmd-service-back-edges): Rename to...
  (shepherd-root-service-type, %shepherd-root-service, shepherd-service-type)
  (<shepherd-service>, shepherd-service, shepherd-service?)
  (make-shepherd-service, shepherd-service-documentation)
  (shepherd-service-provision, shepherd-service-requirement)
  (shepherd-service-respawn, shepherd-service-start)
  (shepherd-service-stop, shepherd-service-auto-start?)
  (shepherd-service-modules, shepherd-service-imported-modules)
  (shepherd-service-file-name, shepherd-service-file)
  (shepherd-service-back-edges): ...this
* gnu/services.scm: Adjust comments.
* gnu/services/avahi.scm (avahi-dmd-service): Rename to...
  (avahi-shepherd-service): ... this.
* gnu/services/base.scm (%root-file-system-dmd-service)
  (file-system->dmd-service-name, mapped-device->dmd-service-name)
  (dependency->dmd-service-name, file-system-dmd-service)
  (mingetty-dmd-service, nscd-dmd-service, guix-dmd-service)
  (guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to...
  (%root-file-system-shepherd-service)
  (file-system->shepherd-service-name, mapped-device->shepherd-service-name)
  (dependency->shepherd-service-name, file-system-shepherd-service)
  (mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service)
  (guix-publish-shepherd-service, udev-shepherd-service)
  (gpm-shepherd-service): ... this.
* gnu/services/databases.scm (postgresql-dmd-service): Rename to...
  (postgresql-shepherd-service): ... this.
* gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service):
  Rename to...
  (upower-shepherd-service, elogind-shepherd-service): ... this.
* gnu/services/dbus.scm (dbus-dmd-service): Rename to...
  (dbus-shepherd-service): ... this.
* gnu/services/lirc.scm (lirc-dmd-service): Rename to...
  (lirc-shepherd-service): ... this.
* gnu/services/mail.scm (dovecot-dmd-service): Rename to...
  (dovecot-shepherd-service): ... this.
* gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service)
  (bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to...
  (dbus-shepherd-service): ... this.
* gnu/services/ssh.scm (lsh-dmd-service): Rename to...
  (lsh-shepherd-service): ... this.
* gnu/services/web.scm (nginx-dmd-service): Rename to...
  (nginx-shepherd-service): ... this.
* gnu/services/xorg.scm (slim-dmd-service): Rename to...
  (slim-shepherd-service): ... this.
* gnu/system.scm (essential-services): Use '%shepherd-root-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust accordingly.
* guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type)
  (export-dmd-graph): Likewise.
* tests/guix-system.sh: Likewise.
* tests/services.scm ("dmd-service-back-edges"): Rename to...
  ("shepherd-service-back-edges"): Adjust accordingly.
* doc/guix.texi: Likewise.
* doc/images/service-graph.dot: Use 'shepherd' service name.
2016-01-29 20:21:53 +03:00
Alex Kost 0190c1c02f Rename (gnu services dmd) to (gnu services shepherd).
* gnu/services/dmd.scm: Rename to...
* gnu/services/shepherd.scm: ... this.
* gnu/system.scm: Use it.
* gnu/system/install.scm: Likewise.
* gnu/services/xorg.scm: Likewise.
* gnu/services/web.scm: Likewise.
* gnu/services/ssh.scm: Likewise.
* gnu/services/networking.scm: Likewise.
* gnu/services/mail.scm: Likewise.
* gnu/services/lirc.scm: Likewise.
* gnu/services/desktop.scm: Likewise.
* gnu/services/dbus.scm: Likewise.
* gnu/services/databases.scm: Likewise.
* gnu/services/base.scm: Likewise.
* gnu/services/avahi.scm: Likewise.
* guix/scripts/system.scm: Likewise.
* tests/services.scm: Likewise.
* tests/guix-system.sh: Likewise.
* doc/guix.texi (Shepherd Services): Adjust accordingly.
* gnu-system.am (GNU_SYSTEM_MODULES): Likewise.
* po/guix/POTFILES.in: Likewise.
2016-01-29 20:21:53 +03:00
Alex Kost b8c02c18b4 Rename '/root/etc/dmd' directory and 'do-not-kill' file.
* gnu/services/base.scm (%do-not-kill-file): Rename to
  "/etc/shepherd/do-not-kill".
* gnu/build/linux-boot.scm (mount-root-file-system): Rename
  "/root/etc/dmd" to "/root/etc/shepherd".
2016-01-29 20:20:19 +03:00
Alex Kost 34044d551f Use 'shepherd' instead of 'dmd' as init system.
* gnu/services/dmd.scm (dmd-boot-gexp): Use binary from 'shepherd' package.
  (dmd-root-service-type): Use 'shepherd' package.
  (%default-modules): Use (shepherd service) module.
* gnu/services/base.scm (%root-file-system-dmd-service): Use
  'stop-logging' procedure to close shepherd log.
2016-01-29 12:07:32 +03:00
Ludovic Courtès 9a8b9eb8de services: guix: Provide Guix via 'profile-service-type'.
* gnu/services/base.scm (guix-service-type): Extend
PROFILE-SERVICE-TYPE.
* gnu/system.scm (%base-packages): Remove GUIX.
2016-01-27 15:48:35 +01:00
Ludovic Courtès be21979d85 file-systems: Add a 'mount?' field.
Fixes <http://bugs.gnu.org/22176>.
Reported by Florian Paul Schmidt <mista.tapas@gmx.net>.

* gnu/system/file-systems.scm (<file-system>)[mount?]: New field.
(file-system->spec): Adjust accordingly.
* gnu/services/base.scm (file-system-dmd-service): Return the empty list
when FILE-SYSTEM has 'mount?' set to false.
(user-processes-service): Select the subset of FILE-SYSTEMS that matches
'file-system-mount?'.
* doc/guix.texi (File Systems): Document it.
2015-12-22 00:29:21 +01:00
Ludovic Courtès e43e84ba7a services: Add 'fstab-service-type'.
* gnu/services/base.scm (file-system->fstab-entry)
(file-systems->fstab): New procedures.
(fstab-service-type): New variable.
* gnu/services/base.scm (file-system-dmd-service): New procedure, taken
from...
(file-system-service-type): ... here.
* gnu/system.scm (essential-services): Add FSTAB-SERVICE-TYPE instance.
2015-12-22 00:04:36 +01:00
宋文武 e10964efd2 services: Add 'session-environment-service'.
* gnu/services/base.scm (session-environment-service): New procedure.
(session-environment-service-type): New variable.
(environment-variables->environment-file): New procedure.
2015-12-05 10:51:49 +08:00
Ludovic Courtès 479b417b54 services: dmd: Strip the default list of modules.
* gnu/services/dmd.scm (%default-imported-modules): Remove (gnu build
file-systems).
(%default-modules): Likewise, and remove (ice-9 ftw).
* gnu/services/base.scm (file-system-service-type): Add 'modules' and
'imported-modules' fields.
2015-11-25 11:59:54 +01:00
David Thompson a907d9973a gnu: services: Fix typo in gpm-dmd-service.
* gnu/services/base.scm (gpm-dmd-service): s/dmd/gpm/
2015-11-20 09:56:41 -05:00
Ricardo Wurmus 80e6f37e30 services: Add udev-rule procedure.
* gnu/services/base.scm (udev-rule): New procedure.
(kvm-udev-rule): Rewrite as variable in terms of udev-rule.
2015-11-19 16:10:52 +01:00
Ricardo Wurmus c797fabe79 services: Export udev-configuration procedures.
* gnu/services/base.scm (udev-configuration, udev-configuration?,
  udev-configuration-rules): Export.
2015-11-18 22:04:48 +01:00
Ludovic Courtès 8664cc882c services: Add 'gpm-service'.
* gnu/services/base.scm (<gpm-configuration>): New record type.
  (gpm-dmd-service): New procedure.
  (gpm-service-type): New variable.
  (gpm-service): New procedure.
* doc/guix.texi (Base Services): Document it.
2015-11-07 18:56:17 +01:00
Ludovic Courtès 6e82863463 system: Rename (gnu system linux) to (gnu system pam).
* gnu/system/linux.scm: Rename to...
* gnu/system/pam.scm: ... this.
* gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu.scm, gnu/services/base.scm, gnu/services/desktop.scm,
  gnu/services/networking.scm, gnu/services/ssh.scm,
  gnu/services/xorg.scm, gnu/system.scm, gnu/system/vm.scm: Likewise.
2015-11-03 18:11:45 +01:00
Ludovic Courtès 1c52181f33 services: Add 'guix-publish-service'.
* gnu/services/base.scm (<guix-publish-configuration>): New record
  type.
  (guix-publish-dmd-service): New procedure.
  (%guix-publish-accounts, guix-publish-service-type): New variables.
  (guix-publish-service): New procedure.
* doc/guix.texi (Invoking guix publish): Add xref to
  'guix-publish-service' anchor.
  (Base Services): Document 'guix-publish-service'.
2015-11-03 18:11:45 +01:00
Ludovic Courtès e502bf8953 system: File systems depend on their corresponding device mappings.
Fixes a regression introduced in commit 0adfe95.

* gnu/system.scm (other-file-system-services)[requirements]: Remove.
  [add-dependencies]: New procedure.
  Use it.
* gnu/system/file-systems.scm (<file-system>)[dependencies]: Update
  comment.
* gnu/services/base.scm (mapped-device->dmd-service-name,
  dependency->dmd-service-name): New procedures.
  (file-system-service-type): Use it.
2015-10-29 19:07:58 +01:00
Ludovic Courtès cd6f6c22fb services: Add 'modify-services'.
* gnu/services.scm (%modify-service, modify-services): New macros.
* gnu/services/base.scm (mingetty-service-type, guix-service-type):
  Export.
* emacs/guix-devel.el (guix-devel-keywords): Add 'modify-services'.
  Ditto in 'guix-devel-scheme-indent' call.
* doc/guix.texi (Using the Configuration System): Give an example of
  'modify-services'.
  (Service Reference): Document it.
2015-10-28 21:58:25 +01:00
Ludovic Courtès b0b9f6e0a6 services: 'guix-configuration' has a 'substitute-urls' field.
* gnu/services/base.scm (<guix-configuration>)[substitute-urls]: New
  field.
  (guix-dmd-service): Honor it.
* doc/guix.texi (Base Services): Document it.
2015-10-28 21:58:25 +01:00
Ludovic Courtès 5f44ee4fa0 services: Unmount user file systems after process termination.
* gnu/services/base.scm (user-unmount-service-type): Change label and
  dmd name to 'user-file-systems'.
  (user-processes-service-type)[requirement]: Add 'user-file-systems'.
2015-10-14 21:39:06 +02:00
Ludovic Courtès 00184239c3 services: 'dmd-service-type' takes a service name.
* gnu/services/dmd.scm (dmd-service-type): Add 'service-name'
  parameter.
* gnu/services/base.scm, gnu/services/networking.scm,
  gnu/system/install.scm: Adjust callers.
2015-10-14 21:39:05 +02:00
Ludovic Courtès 0adfe95a3e services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.

* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
  (<service-extension>, <service-type>): New record types.
  (write-service-type, compute-boot-script, second-argument): New
  procedures.
  (%boot-service, boot-service-type): New variables.
  (file-union, directory-union, modprobe-wrapper,
  activation-service->script, activation-script,
  gexps->activation-gexp): New procedures.
  (activation-service-type, %activation-service): New variables.
  (etc-directory, files->etc-directory, etc-service): New procedures.
  (etc-service-type, setuid-program-service, firmware-service-type): New
  variables.
  (firmware->activation-gexp): New procedure.
  (&service-error, &missing-target-service-error,
  &ambiguous-target-service-error): New condition types.
  (service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
  (configuration-file): Replace keyword parameters with a single
  'config' parameter.
  (%avahi-accounts, %avahi-activation, avahi-service-type): New
  variables.
  (avahi-dmd-service): New procedure.
  (avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
  root-file-system-service-type): New variables.
  (root-file-system-service): Use them.
  (file-system->dmd-service-name): New procedure.
  (file-system-service-type): New variable.
  (file-system-service): Use it.  Replace keyword parameters with a
  single 'file-system' object.
  (user-unmount-service-type): New variable.
  (user-unmount-service): Use it.
  (user-processes-service-type): New variable.
  (user-processes-service): Use it.
  (host-name-service-type): New variable.
  (host-name-service): Use it.
  (console-keymap-service-type): New variable.
  (console-keymap-service): Use it.
  (console-font-service-type): New variable.
  (console-font-service): Use it.
  (mingetty-pam-service, mingetty-dmd-service): New procedures.
  (mingetty-service-type): New variable.
  (mingetty-service): Use it.
  (nscd-dmd-service): New procedure.
  (nscd-activation, nscd-service-type): New variables.
  (nscd-service): Use the latter.
  (syslog-service-type): New variable.
  (syslog-service): Use it.
  (<guix-configuration>): New record type.
  (%default-guix-configuration): New variable.
  (guix-dmd-service, guix-accounts, guix-activation): New procedures.
  (guix-service-type): New variable.
  (guix-service): Replace list of keyword parameters with a single
  'config' parameter.  Rewrite using 'service'.
  (<udev-configuration>): New record type.
  (udev-dmd-service): New procedure.
  (udev-service-type): New variable.
  (udev-service): Use it.
  (device-mapping-service-type): New variable.
  (device-mapping-service): Use it.
  (swap-service-type): New variable.
  (swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
  type.
  (%postgresql-accounts, postgresql-activation): New variables.
  (postgresql-dmd-service): New procedure.
  (postgresql-service): Rewrite using 'service' and
  'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
  Remove.
  (wrapped-dbus-service): New procedure.
  (<upower-configuration>): New record type.
  (upower-configuration-file): Replace keyword parameters with single
  <upower-configuration> parameter.
  (%upower-accounts, %upower-activation): New variables.
  (upower-dbus-service, upower-dmd-service): New procedures.
  (upower-service-type): New variable.
  (upower-service): Rewrite using 'service' and 'upower-configuration'.
  (%colord-activation, %colord-accounts): New variables.
  (colord-dmd-service): New procedure.
  (colord-service-type): New variable.
  (colord-service): Rewrite using 'service'.
  (<geoclue-configuration>): New record type.
  (geoclue-configuration-file): Replace keyword parameters with a single
  'config' parameter.
  (geoclue-dbus-service, geoclue-dmd-service): New procedures.
  (%geoclue-accounts, geoclue-service-type): New variables.
  (geoclue-service): Rewrite using 'service' and
  'geoclue-configuration'.
  (%polkit-accounts, %polkit-pam-services, polkit-service-type): New
  variables.
  (polkit-dmd-service): New procedure.
  (polkit-service): Rewrite using 'service'.
  (<elogind-configuration>)[elogind]: New field.
  (elogind-dmd-service): New procedure.
  (elogind-service-type): New variable.
  (elogind-service): Rewrite using 'service'.
  (%desktop-services): Remove argument to 'dbus-service'.  Remove 'map'
  over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
  (dmd-root-service-type, %dmd-root-service): New variables.
  (dmd-service-type): New macro.
  (<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
  (%lirc-activation): New variable.
  (lirc-dmd-service): New procedure.
  (lirc-service-type): New variable.
  (lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
  (static-networking-service-type): New variable.
  (static-networking-service): Rewrite using 'service' and
  'static-networking'.
  (dhcp-client-service-type): New variable.
  (dhcp-client-service): Rewrite using 'service'.
  (<ntp-configuration>): New record type.
  (ntp-dmd-service): New procedure.
  (ntp-service-type): New variable.
  (ntp-service): New procedure.
  (%tor-accounts, tor-service-type): New variable.
  (tor-dmd-service): New procedure.
  (tor-service): Rewrite using 'service'.
  (<bitlbee-configuration>): New record type.
  (bitlbee-dmd-service): New procedure.
  (%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
  variables.
  (bitlbee-service): Rewrite using 'service'.
  (%wicd-activation): New variable.
  (wicd-dmd-service): New procedure.
  (wicd-service-type): New variable.
  (wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
  (activation): Rename to...
  (lsh-initialization): ... this.
  (lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
  (lsh-service-type): New variable.
  (lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
  (%nginx-accounts): New variable.
  (nginx-activation, nginx-dmd-service): New procedures.
  (nginx-service-type): New variable.
  (nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
  (slim-pam-service, slim-dmd-service): New procedures.
  (slim-service-type): New variable.
  (slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
  (other-file-system-services): Adjust to new 'file-system-service'
  signature.
  (essential-services): Add #:container? parameter.  Add
  %DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
  'pam-root-service', 'account-service', 'operating-system-etc-service',
  and a SETUID-PROGRAM-SERVICE instance.
  (operating-system-services): Pass #:container? to 'essential-services.
  (etc-directory): Remove.
  (operating-system-etc-service): New procedure.  Rewrite as a call to
  'etc-service'.
  (operating-system-accounts): Change to not return accounts required by
  services.
  (operating-system-etc-directory): Rewrite as a call to 'fold-services'
  and 'etc-directory'.
  (user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
  (operating-system-activation-script): Rewrite as a call to
  'fold-services' and 'activation-service->script'.
  (operating-system-boot-script): Likewise.
  (operating-system-derivation): Add call to 'lower-object'.
  (emacs-site-file, emacs-site-directory, shells-file): Change to use
  'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
  (cow-store-service): Rewrite using 'service'.
  (/etc/configuration-files): New procedure.
  (configuration-template-service-type,
  %configuration-template-service): New variables.
  (configuration-template-service): Remove.
  (installation-services): Adjust accordingly.  Adjust argument to
  'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
  (pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
  account-activation, etc-skel, account-service): New procedures.
  (account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
  (Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-10-10 22:55:15 +02:00
Ludovic Courtès b893f1aec3 services: nscd-service: Fit everything into <nscd-configuration>.
* gnu/services/base.scm (<nscd-configuration>)[glibc, name-services]:
  New fields.
  (nscd-service): Remove #:glibc and #:name-services parameters.  Adjust
  body to take those from CONFIG.
* gnu/services/desktop.scm (%desktop-services): Adjust accordingly.
* doc/guix.texi (Base Services): Adjust accordingly.
  (Name Service Switch): Adjust example.
2015-10-10 22:46:14 +02:00
Ludovic Courtès 66e4f01c60 services: mingetty-service: Use <mingetty-configuration> objects.
* gnu/services/base.scm (<mingetty-configuration>): New record type.
  (mingetty-service): Expect a single <mingetty-configuration> instead
  of keyword arguments.
  (%base-services): Adjust accordingly.
* gnu/system/install.scm (installation-services): Likewise.
* doc/guix.texi (Base Services): Adjust accordingly.
2015-10-10 22:46:14 +02:00
Ludovic Courtès be1c2c54d9 system: Make service procedures non-monadic.
* gnu/services/avahi.scm (configuration-file): Use 'plain-file' instead
  of 'text-file'.
  (avahi-service): Turn into a regular procedure that returns a <service>.
* gnu/services/base.scm (root-file-system-service, file-system-service,
  user-unmount-service, user-processes-service, host-name-service,
  console-keymap-service, console-font-service, mingetty-service,
  nscd.conf-file, nscd-service): Likewise.
  (%default-syslog.conf): New variable.
  (syslog-service): Use it.  Turn into a regular procedure.
  (guix-service, udev-rules-union, kvm-udev-rule, udev-service,
  device-mapping-service, swap-service): Likewise.
* gnu/services/databases.scm (%default-postgres-hba,
  %default-postgres-ident): Use 'plain-file' instead of 'text-file'.
  (%default-postgres-config): Use 'mixed-text-file' instead of
  'text-file*'.
  (postgresql-service):  Use 'program-file' instead of 'gexp->script'.
  Turn into a regular procedure.
* gnu/services/desktop.scm (dbus-configuration-directory): Use
  'computed-file' instead of 'gexp->derivation'.
  (upower-configuration-file, geoclue-configuration-file,
  elogind-configuration-file): Use 'plain-file' instead of 'text-file'.
  (dbus-service, upower-service, colord-service, geoclue-service,
  polkit-service, elogind-service): Turn into regular procedures.
  (%desktop-services): Remove use of 'mlet' when iterating on
  %BASE-SERVICES.
* gnu/services/lirc.scm (lirc-service): Turn into a regular procedure.
* gnu/services/networking.scm (static-networking-service,
  dhcp-client-service, ntp-service, tor-service, bitlbee-service,
  wicd-service): Likewise.
* gnu/services/ssh.scm (lsh-service): Likewise.
* gnu/services/web.scm (nginx-service): Likewise.
* gnu/services/xorg.scm (xorg-configuration-file): Use 'mixed-text-file'
  instead of 'text-file*'.
  (xorg-start-command, slim-service): Turn into regular procedures.
  (xinitrc): Use 'program-file' instead of 'gexp->script'.
* gnu/system/install.scm (cow-store-service,
  configuration-template-service): Turn into regular procedures.
* gnu/system.scm (other-file-system-services, device-mapping-services,
  swap-services, essential-services, operating-system-services,
  user-shells, operating-system-accounts): Remove now unnecessary
  'mlet' and turn into regular procedures.
  (operating-system-etc-directory, operating-system-activation-script,
  operating-system-boot-script): Adjust accordingly.
* doc/guix.texi (Base Services, Networking Services, X Window, Desktop
  Services, Database Services, Web Services, Various Services, Name
  Service Switch): Adjust accordingly.
2015-10-10 22:46:14 +02:00
Ludovic Courtès ce8a6dfc43 services: 'mingetty-service' no longer takes monadic values.
* gnu/services/base.scm (mingetty-service): Change default value of
  #:motd from a monadic value to a <plain-file>.  Assume MOTD to be a
  file-like object.  Assume LOGIN-PROGRAM is a gexp or #f.
  (%base-services): Use 'plain-file' instead of 'text-file' for motd.
* gnu/system/linux.scm (unix-pam-service): Update docstring to mention
  that MOTD is a file-like object.
* doc/guix.texi (Base Services): Adjust 'mingetty-service' documentation
  accordingly.
* gnu/system/install.scm (installation-services): Adjust accordingly.
  (log-to-info): Use 'program-file' instead of 'gexp->script'.
2015-10-10 22:46:14 +02:00
Ludovic Courtès 0081410da0 Revert "services: 'mingetty-service' no longer takes monadic values."
This reverts commit daa48c3179.
2015-09-13 12:04:55 +02:00
Ludovic Courtès daa48c3179 services: 'mingetty-service' no longer takes monadic values.
* gnu/services/base.scm (mingetty-service): Change default value of
  #:motd from a monadic value to a <plain-file>.  Assume MOTD to be a
  file-like object.  Assume LOGIN-PROGRAM is a gexp or #f.
  (%base-services): Use 'plain-file' instead of 'text-file' for motd.
* gnu/system/linux.scm (unix-pam-service): Update docstring to mention
  that MOTD is a file-like object.
* doc/guix.texi (Base Services): Adjust 'mingetty-service' documentation
  accordingly.
2015-09-13 11:54:56 +02:00
Mark H Weaver 4307c476c4 services: Add udev rules for (upower colord elogind) to %desktop-services.
* gnu/services/desktop.scm (%desktop-services): Replace the 'udev-service'
  from %base-services.
* gnu/services/base.scm (%base-services): Add a comment to keep them in sync.
2015-09-10 19:46:13 -04:00
Ludovic Courtès 68ac258b52 system: Use the CRDA udev rules.
* gnu/services/base.scm (%base-services): Add CRDA to the #:rules of
  'udev-service'.
* gnu/system/install.scm (installation-services): Likewise.
2015-07-17 15:35:57 +02:00
Ludovic Courtès 64720891ae system: Make /dev/kvm 660.
* gnu/services/base.scm (kvm-udev-rule): Change /dev/kvm mode to 0660 as a
  followup to the resolution of <http://bugs.gnu.org/18994>.
2015-07-15 23:57:01 +02:00
Ludovic Courtès 60a56db007 services: swap: Use 'restart-on-EINTR'.
* gnu/services/base.scm (swap-service)[start, stop]: Use 'restart-on-EINTR'.
* guix/build/syscalls.scm (swapoff): Fix typo in 'throw' arguments.
2015-05-22 11:51:12 +02:00
Alex Kost 5eca94594d services: Add console-keymap service.
* gnu/services/base.scm (console-keymap-service): New procedure.
* doc/guix.texi (Base Services): Document it.

Co-authored-by: 宋文武 <iyzsong@gmail.com>
2015-05-01 21:00:39 +03:00
Ludovic Courtès b86fee7848 file-systems: Use a second 'mount' call for read-only bind mounts.
* gnu/build/file-systems.scm (MS_REMOUNT): New constant.
  (mount-file-system): Add 'flags' local variable.   When FLAGS has
  MS_BIND & MS_RDONLY, call 'mount' with MS_REMOUNT.
* gnu/services/base.scm (file-system-service) <start>: Likewise.
2015-04-20 22:16:13 +02:00
Ludovic Courtès 4c9050c63d doc: Add example showing how to customize 'nscd-service'.
* doc/guix.texi (Name Service Switch): Add link to nss-mdns.  Add
  example show how to pass #:name-services to 'nscd-service'.
  (Base Services): Add link from 'nscd-service' to the above.
* gnu/services/base.scm (nscd-service): Update docstring accordingly.
2015-04-12 22:34:47 +02:00
Alex Kost 1bb76f7523 services: syslog-service: Add 'config-file' argument.
* gnu/services/base.scm (syslog-service): Add 'config-file' keyword
argument.
* doc/guix.texi (Base Services): Document it.
2015-04-01 20:54:37 +03:00
Alex Kost 52b76622e4 services: guix-service: Add service documentation.
* gnu/services/base.scm (guix-service): Add 'documentation' field to the
  service.
2015-03-26 15:49:03 +03:00
Ludovic Courtès 2d1d2dd804 services: guix-service: Add 'lsof' and 'lsh' to guix-daemon's $PATH.
* gnu/services/base.scm (guix-service): Add #:lsof and #:lsh parameters.
  [start]: Pass #:environment-variables to 'make-forkexec-constructor'.
2015-03-19 23:15:50 +01:00
Ludovic Courtès 5250a4f215 services: guix-service: Remove extraneous monadism.
* gnu/services/base.scm (guix-build-accounts): Remove unneeded
  'with-monad'.
  (guix-service): Adjust accordingly.
2015-03-17 22:25:55 +01:00