Commit Graph

252 Commits (e71b20e5b5a16cf81fa12baa38ac37bcfe2c1989)

Author SHA1 Message Date
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 f2ab925028 services: xorg: Fix ~/.xsession handling.
Fixes a regression introduced in c510cbb4ec.

* gnu/services/xorg.scm (xinitrc)[builder]: Add missing 'apply' when
XSESSION-FILE exists.
2016-03-24 11:01:07 +01:00
Ludovic Courtès 9b1cee97a5 services: postgresql: Use syslog.
Fixes <http://bugs.gnu.org/23064>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.

* gnu/services/databases.scm (%default-postgres-config): Add
'log_destination' line.
(postgresql-shepherd-service): Add requirement on 'syslogd'.
2016-03-23 00:23:12 +01:00
Ludovic Courtès cd6cc144e0 Merge branch 'security-updates' 2016-03-22 00:14:03 +01:00
Ludovic Courtès c510cbb4ec services: xorg: Accept session commands with arguments.
Before that, a session command with several items, such as
'gnome-session --disable-acceleration-check', would trigger the fallback
session.

* gnu/services/xorg.scm (xinitrc)[builder]: Accept command lines with
more than one arguments.
2016-03-18 19:42:00 +01:00
Andy Wingo 7a2413e46d gnu: services: Add GNOME and XFCE desktop services.
* gnu/services/desktop.scm (package-direct-input-selector): New
  function.
  (<gnome-desktop-configuration>, gnome-desktop-service-type)
  (<xfce-desktop-configuration>, xfce-desktop-service-type): New
  variables.
  (gnome-desktop-service, xfce-desktop-service): New public variables.

* doc/guix.texi (Desktop Services): Document new variables.
2016-03-15 21:03:27 +01:00
Ludovic Courtès f5a9103991 gnu: dbus: Incorporate "dbus-helper-search-path.patch".
* gnu/packages/glib.scm (dbus)[source]: Apply
"dbus-helper-search-path.patch".
(dbus/activation): Remove.
* gnu/services/dbus.scm (<dbus-configuration>)[dbus]: Default to DBUS.
(dbus-service): Likewise.
2016-03-09 15:31:23 +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 956ad60cad services: elogind: Rely on D-Bus activation.
Previously elogind was explicitly spawned by the Shepherd.  Now it is
activated by dbus-daemon on demand.

* gnu/packages/freedesktop.scm (elogind)[arguments]: Add
'fix-service-file' phase.
* gnu/services/desktop.scm (elogind-shepherd-service): Remove.
(elogind-dbus-service): New procedure.
(elogind-service-type): Do not extend SHEPHERD-ROOT-SERVICE-TYPE.  Use
'elogind-dbus-service' for DBUS-ROOT-SERVICE-TYPE.
2016-03-07 00:01:03 +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
Andy Wingo 79fd74facd gnu: services: Start X with -configdir.
* gnu/services/xorg.scm (%default-xorg-modules): New public variable.
(xorg-configuration-directory): New function.
(xorg-start-command): Add #:modules keyword argument, defaulting to
%default-xorg-modules.  Build an xorg.conf.d directory from those
modules, and pass it to X via the -configdir parameter.
2016-02-24 11:49:57 -05:00
Andy Wingo ea84bd88da gnu: services: Install policies for polkit service.
* gnu/services/desktop.scm (polkit-etc-files): Add the polkit package
  itself to the list of packages to scan for .policy files.  This add
  support for pkexec.
2016-02-24 10:16:54 +01:00
Ludovic Courtès f2d8faff04 services: herd: Add missing newlines in error messages.
* gnu/services/herd.scm (report-action-error): Add missing newlines in
messages.
2016-02-23 13:03:23 +01:00
Leo Famulari 8823ed4e12 gnu: Fix syntax error in postgresql-service.
Fixes <http://bugs.gnu.org/22618>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.

* gnu/services/databases.scm (%default-postgres-config): Add missing
quote in default configuration.
2016-02-10 15:34:11 -05: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 e7ad0d5862 services: elogind: Extend PAM to use 'pam_elogind.so'.
Thanks to Andy Wingo <wingo@igalia.com> for explaining this at
<https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00439.html>.

* gnu/services/desktop.scm (pam-extension-procedure): New procedure.
(elogind-service-type): Extend PAM-ROOT-SERVICE-TYPE.
2016-02-06 12:01:42 +01:00
Ludovic Courtès 05c5b16585 services: elogind: Add elogind to the global profile.
* gnu/services/desktop.scm (elogind-service-type): Extend
PROFILE-SERVICE-TYPE.
2016-02-05 22:10:42 +01:00
Ludovic Courtès edc891fa76 services: upower: Add upower to the global profile.
* gnu/services/desktop.scm (upower-service-type): Extend
PROFILE-SERVICE-TYPE.
2016-02-05 22:10:42 +01:00
Ludovic Courtès 234ea8a71c service: shepherd: All of the config file is in 'call-with-error-handling'.
* gnu/services/shepherd.scm (shepherd-configuration-file)[config]: Wrap
all the body in 'call-with-error-handling'.
2016-02-05 14:01:46 +01:00
Ludovic Courtès 081bd3bd29 service: shepherd: Guard against exceptions raised by 'start'.
Fixes <http://bugs.gnu.org/22548>.
Reported by Albin <albin@fripost.org>, Mark H Weaver, and Alex Kost.

* gnu/services/shepherd.scm (shepherd-configuration-file)[config]: Guard
against 'service-error?'.
2016-02-05 14:01:46 +01:00
Ludovic Courtès 1d6b7d5847 guix system: Simply warn if we cannot talk to the shepherd.
Before that 'open-connection' would return #f, and thus
'current-services' would return a single #f value when its continuation
expects two.

Reported by calher on #guix.

* gnu/services/herd.scm (open-connection): Rethrow system-error
exceptions.
(with-shepherd): Expect CONNECTION to always be true; remove useless
'dynamic-wind'.
* guix/scripts/system.scm (warn-on-system-error): New macro.
(upgrade-shepherd-services): Wrap body in 'warn-on-system-error'.
2016-02-05 14:01:46 +01:00
Ludovic Courtès 240b57f0ca guix system: 'reconfigure' loads and starts new services.
Partly fixes <http://bugs.gnu.org/22039>.

* gnu/services/herd.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/services/shepherd.scm (shepherd-service-canonical-name): New
procedure.
(shepherd-service-file): Export.
* guix/scripts/system.scm (upgrade-shepherd-services): New procedure.
(switch-to-system): Use it.
* guix/ui.scm (info): New procedure.
* doc/guix.texi (Invoking guix system): Mention system services.
2016-02-03 22:28:28 +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 26b94866ad services: xorg: Use 'shepherd' instead of 'dmd'.
* gnu/services/xorg.scm (slim-configuration-dmd): Rename to...
  (slim-configuration-shepherd): ... this.
  (slim-shepherd-service): Adjust accordingly.
  (slim-service): Take 'shepherd' keyword argument.
2016-01-29 20:21:53 +03:00
Alex Kost fe1ad5f5db services: shepherd: Rename shepherd configuration file.
* gnu/services/shepherd.scm (dmd-configuration-file): Rename to...
  (shepherd-configuration-file): ... this.  Use "shepherd.conf" name.
  (dmd-boot-gexp): Use it.
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 c273d81bfa services: dmd: Provide dmd via 'profile-service-type'.
* gnu/services/dmd.scm (dmd-root-service-type): Extend
PROFILE-SERVICE-TYPE.
* gnu/system.scm (%base-packages): Remove dmd.
2016-01-27 15:48:35 +01:00
Ludovic Courtès 893106cbbf services: avahi: Export service type.
* gnu/services/avahi.scm: Export 'avahi-service-type'.
2016-01-21 00:22:34 +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
Andy Wingo d8c18af834 gnu: Add dovecot service
* gnu/services/mail.scm: New file.
(&dovecot-configuration-error, dovecot-configuration-error?)
(dovecot-service, dovecot-configuration, dict-configuration)
(passdb-configuration, userdb-configuration)
(unix-listener-configuration, fifo-listener-configuration)
(inet-listener-configuration, service-configuration)
(protocol-configuration, plugin-configuration, mailbox-configuration)
(namespace-configuration, opaque-dovecot-configuration): New public
variables.

* gnu-system.am (GNU_SYSTEM_MODULES): Add (gnu services mail).

* doc/guix.texi (Mail Services): New node.
2015-12-18 09:24:27 +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
Ricardo Wurmus eac26c3b09 services: Add pkexec to setuid programs.
* gnu/services/desktop.scm (polkit-setuid-programs): Add pkexec to
  list of setuid programs.
2015-11-29 20:33:35 +01:00
Ludovic Courtès 6629099a63 services: tor: Store private data under /var/lib/tor.
* gnu/services/networking.scm (tor-configuration->torrc): Add
'DataDirectory' clause.  Change 'HiddenServiceDir' to
/var/lib/tor/hidden-services/NAME.
(tor-hidden-service-activation): Create /var/lib/tor.
(tor-hidden-service): Adjust docstring.
* doc/guix.texi (Networking Services): Adjust accordingly.
2015-11-27 23:29:51 +01:00
Ludovic Courtès 5ee35eb747 services: tor: Write to syslog.
* gnu/services/networking.scm (tor-configuration->torrc): Add "Log
notice syslog".
(tor-dmd-service): Add 'syslogd' to 'requirement'.
2015-11-27 23:08:00 +01:00
Ludovic Courtès 6331bde73f services: Add 'tor-hidden-service'.
* gnu/services/networking.scm (<tor-configuration>, <hidden-service>):
New record types.
(tor-configuration->torrc): New procedure.
(tor-dmd-service): Use it.
(tor-hidden-service-activation): New procedure.
(tor-service-type)[extensions]: Extend ACTIVATION-SERVICE-TYPE.
[compose, extend]: New fields.
(tor-service): Use 'tor-configuration'.
(tor-hidden-service-type): New variable.
(tor-hidden-service): New procedure.
2015-11-27 23:04:49 +01:00
Ludovic Courtès fde40c98f9 services: lsh: Correctly handle #:interfaces option.
* gnu/services/ssh.scm (lsh-dmd-service)[lsh-command]: Pass a series of
--interface flags instead of the nonexistent --interfaces option.
2015-11-27 22:46:27 +01:00
宋文武 7234ad4f54 services: Add network-manager-service.
* gnu/services/networking.scm (network-manager-service): New procedure.
(network-manager-service-type, %network-manager-activation): New variables.
(network-manager-dmd-service): New procedure.
2015-11-26 13:50:13 +08:00
David Thompson 4b7513e043 services: xorg: Export additional symbols.
'slim-configuration' and 'slim-service-type' are needed if one wishes to
use 'modify-services' on a service list that includes the slim service.

* gnu/services/xorg.scm: Export 'slim-configuration' and
  'slim-service-type'.
2015-11-25 12:47:58 -05:00
Ludovic Courtès b9c7ed71b1 services: dmd: Spawn a REPL upon failure to load a service definition.
Fixes <http://bugs.gnu.org/19779>.
Reported by Mark H Weaver <mhw@netris.org>.

* gnu/services/dmd.scm (dmd-configuration-file)[config]: Wrap
'primitive-load' calls in 'call-with-error-handling'.
2015-11-25 11:59:54 +01: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
Ludovic Courtès fae685b9cc services: dmd: Add 'modules' and 'imported-modules' fields.
* gnu/services/dmd.scm (%default-imported-modules, %default-modules):
New variables.
* gnu/services/dmd.scm (<dmd-service>)[modules, imported-modules]: New
field.
* gnu/services/dmd.scm (dmd-service-file-name, dmd-service-file): New
procedures.
(dmd-configuration-file)[modules]: Compute based on the
'imported-modules' field of SERVICES.
(dmd-configuration-file): Remove 'use-modules' form.  Use
'dmd-service-file', and call 'primitive-load' on each file.
* doc/guix.texi (dmd Services): Document the new fields.
2015-11-25 11:59:54 +01:00
Ludovic Courtès 2d2651e781 services: dmd: Error out upon unmet dmd requirements.
* gnu/services/dmd.scm (assert-no-duplicates): Rename to...
(assert-valid-graph): ... this.
[provisions]: New variable.
[assert-satisfied-requirements]: New procedure.
Use it.
* tests/guix-system.sh: Add test with unmet dmd requirements.
2015-11-24 23:54:30 +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