Commit Graph

626 Commits (a076f19908d06b6df49f1c25c40de8838213cd71)

Author SHA1 Message Date
Christopher Baines 2881f85220
services: web: Add support for configuring the nginx server names hash.
The nginx service can fail to start if the server names hash bucket size is
too small, which can happen on some systems, and when using QEMU, depending on
the CPU.

* gnu/services/web.scm (<nginx-configuration>): Add
  server-names-hash-bucket-size and server-names-hash-bucket-max-size.
  (default-nginx-config): Add support for the new hash bucket size parameters.
  (nginx-service, nginx-activation): Pass the new hash bucket size parameters
  through to the default-nginx-config procedure.
* doc/guix.texi (Web Services): Document the new hash bucket size parameters.
2017-12-11 20:57:34 +00:00
Christopher Baines c48aa70a9a
services: web: Remove default certificate and key files for nginx.
If nginx is configured with a ssl-certificate file, and ssl-certificate-key,
it will fail to start unless these exist. To avoid this happening, change the
default to #f.

* gnu/services/web.scm (<nginx-server-configuration>)
  [ssl-certificate,ssl-certificate-key]: Set the defaults to #f.
* gnu/tests/web.scm (%nginx-servers): Remove redundant
  nginx-server-configuration fields.
* doc/guix.texi (Web Services): Update examples and documentation.
2017-12-11 20:36:43 +00:00
Christopher Baines b7db2c63ed
web: Don't error about missing ssl related files.
Erroring here prevents doing things like building a system using nginx on a
different machine from where it's intended to be deployed, or creating
containers and VMs that use the ssl-certificate parts of the nginx
configuration, without also getting these files to exist.

* gnu/services/web.scm (emit-nginx-server-config): Don't error on missing ssl
  related files.
2017-12-11 20:36:35 +00:00
Ludovic Courtès 787e8a80d5
services: console-font: Use 'tcsetattr' instead of invoking 'unicode_start'.
This is more robust, faster, and incidentally gets rid of remaining
"error in the finalization thread: Bad file descriptor" messages.

* gnu/services/base.scm (unicode-start): Rewrite to use 'tcgetattr' and
'tcsetattr'.
(console-font-shepherd-services)[start]: Add 'loop' to check whether
DEVICE is ready.  Tolerate EX_OSERR return from 'setfont'.
[modules]: New field.
2017-12-06 08:52:31 +01:00
Ludovic Courtès aab322d909
install: Don't start sshd by default.
Reported by Christopher Baines <mail@cbaines.net>
at <https://lists.gnu.org/archive/html/guix-devel/2017-12/msg00058.html>.

* gnu/services/ssh.scm (<openssh-configuration>)[%auto-start?]: New
field.
(openssh-shepherd-service): Honor it.
* gnu/system/install.scm (%installation-services): Set '%auto-start?' to
 #f for openssh-service-type.
2017-12-04 23:31:15 +01:00
Ludovic Courtès be5622e7f1
maint: Add 'berlin.guixsd.org.pub'.
* bayfront.guixsd.org.pub: Rename to...
* berlin.guixsd.org.pub: ... this.
* Makefile.am (dist_pkgdata_DATA): Adjust accordingly.
* gnu/services/base.scm (%default-authorized-guix-keys): Likewise.
2017-12-04 17:57:37 +01:00
Ludovic Courtès 617e87bff1
services: xorg: Properly handle the case where ~/.xession is used.
Fixes a regression introduced in
65c0f43649 in the case where users provide
~/.xsession and SESSION is #f.

* gnu/services/xorg.scm (xinitrc): In the XSESSION-FILE case, check
whether SESSION is #f.
2017-12-04 10:36:48 +01:00
Ludovic Courtès 4afc903a8c
services: xorg: Add 'font-misc-misc' to the default font set.
Fixes <https://bugs.gnu.org/24279>.
Reported by John Darrington <john@darrington.wattle.id.au>.

* gnu/services/xorg.scm (%default-xorg-fonts): Add FONT-MISC-MISC.
2017-12-01 16:00:14 +01:00
Ludovic Courtès 3af03e5967
services: certbot: Add default value and description.
* gnu/services/certbot.scm (certbot-service-type)
[default-value, description]: New fields.
* po/packages/POTFILES.in: Add it.
2017-11-28 23:34:25 +01:00
Ludovic Courtès a222b734b3
services: cgit, git-daemon: Add description and default value.
* gnu/services/version-control.scm (git-daemon-service-type)
[description, default-value]: New fields.
(cgit-service-type)[default-value]: New field.
* po/packages/POTFILES.in: Add version-control.scm.
2017-11-28 23:34:25 +01:00
Andy Wingo 410349347a
services: Add Git HTTP(S) service support.
* doc/guix.texi (Version Control Services): Add documentation on the HTTP
backend for git.
* gnu/services/version-control.scm (<git-http-configuration>): New data type.
(git-http-nginx-location-configuration): New helper function.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-28 23:34:25 +01:00
Andy Wingo 1115f14017
services: Add certbot service.
* gnu/services/certbot.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.
* doc/guix.texi (Certificate Services): New section.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-28 23:34:24 +01:00
Ludovic Courtès 65c0f43649
services: xorg: Remove WindowMaker as a default fallback.
* gnu/services/xorg.scm (xinitrc)[builder](system-profile)
(user-profile): New variables.
(xsession-command, find-session): New procedures.
When FALLBACK-SESSION is #f, find a valid session at run time.
* doc/guix.texi (X Window): Adjust accordingly, and insist that one
or more window managers must be installed.
2017-11-28 11:24:46 +01:00
Ludovic Courtès b37f86d7a3
services: xorg: Document 'slim-configuration' and deprecate 'slim-service'.
* gnu/services/xorg.scm (<slim-configuration>): Provide default values
for all fields.
(slim-service-type)[default-value]: New field.
* doc/guix.texi (X Window): Remove 'slim-service' documentation.
Document 'slim-service-type' and 'slim-configuration'.
* gnu/services/desktop.scm (%desktop-services): Use 'slim-service-type'.
2017-11-28 11:24:45 +01:00
Ludovic Courtès 94b9abd942
services: slim: Remove unused 'bash' configuration field.
* gnu/services/xorg.scm (<slim-configuration>)[bash]: Remove.
(slim-service): Adjust accordingly.
2017-11-28 11:14:25 +01:00
Ludovic Courtès d344f5a528
services: xorg: Allow users to specify a list of modules.
* gnu/services/xorg.scm (%default-xorg-fonts): New variable.
(xorg-configuration-file): Add #:modules and #:fonts.  Rewrite to return
a 'computed-file' that honors MODULES and FONTS.
(xorg-wrapper): Pass #:modules to 'xorg-configuration-file'.
(xorg-start-command): Add #:fonts.  Pass #:fonts and #:modules to
'xorg-configuration-file'.
* doc/guix.texi (X Window): Adjust documentation of 'xorg-start-command'
and 'xorg-configuration-file'.
2017-11-28 10:46:03 +01:00
Clément Lassieur 19ff1f2687
services: configuration: Show default values of list types.
* doc/guix.texi (Messaging Services): Regenerate it.
* gnu/services/configuration.scm (show-default?): Check VAL rather than DEFAULT.
* gnu/services/messaging.scm (show-default?): Check VAL rather than DEFAULT.
(prosody-configuration)[modules-enabled]: Remove default value from docstring.
2017-11-28 03:49:47 +01:00
Christopher Baines 5823396404
services: desktop: Create /var/run/udisks2 for the udisks service.
* gnu/services/desktop.scm (%udisks-activation): New variable.
  (udisks-service-type)[extensions]: Extend the activation service type with
  %udisks-activation.
2017-11-27 19:41:13 +00:00
Clément Lassieur e30038dae1
services: prosody: Add support for disable-sasl-mechanisms.
* doc/guix.texi (Messaging Services): Update accordingly.
* gnu/services/messaging.scm (prosody-configuration)[disable-sasl-mechanisms]:
New field.
2017-11-26 15:30:57 +01:00
Clément Lassieur 274b9500d1
services: prosody: Allow to add raw content to the config file.
* doc/guix.texi (Messaging Services): Update accordingly.
* gnu/services/messaging.scm (prosody-configuration)[raw-content]: New field.
(raw-content?, serialize-raw-content): New procedures.
2017-11-26 15:30:57 +01:00
Clément Lassieur 1f6f1a07c8
services: prosody: Add support for http-max-content-size.
* doc/guix.texi (Messaging Services): Update accordingly.
* gnu/services/messaging.scm (prosody-configuration)[http-max-content-size]:
New field.
2017-11-26 15:30:57 +01:00
Clément Lassieur f59de6bea9
services: prosody: Add support for http-external-url.
* doc/guix.texi (Messaging Services): Update accordingly.
* gnu/services/messaging.scm (prosody-configuration)[http-external-url]: New
field.
2017-11-26 15:30:56 +01:00
Clément Lassieur 5cc6dcd734
services: prosody: Adapt to Prosody 0.10.0.
* doc/guix.texi (Messaging Services): Add "mam" as a module example.  Document
'prosodyctl check'.  Replace 'prosodyctl cert request' with 'prosodyctl cert
import'.  Regenerate it.
* gnu/services/messaging.scm (serialize-module-list): Remove "posix" from the
default modules list because it is now automatically loaded.
(ssl-configuration)[key, certificate]: Remove them because they are now
automatically located.  Fix their docstrings.
(%default-modules-enabled): Add "carbons" and "blocklist".
(prosody-configuration)[certificates]: Set default directory from which
certificates/keys will be automatically located.
2017-11-26 15:30:56 +01:00
Ludovic Courtès 9e549ad1c3
services: dicod: Run in a container.
* gnu/services/dict.scm (dicod-shepherd-service): Add
'with-imported-modules' form and 'modules' field.  Use
'make-forkexec-constructor/container' instead of
'make-forkexec-constructor'.
2017-11-22 23:16:01 +01:00
Ludovic Courtès a0fea77dbb
services: guix: Remove dependency on 'lsof'.
This is a followup to b8f59cdc20e9d83ce63523ef917e95fcee07f134:
'list-runtime-roots' no longer depends on 'lsof'.

* gnu/services/base.scm (<guix-configuration>)[lsof]: Remove.
(guix-shepherd-service): Adjust accordingly.
* doc/guix.texi (Base Services): Adjust accordingly.
* gnu/system.scm (%base-packages): Remove LSOF.
2017-11-13 11:36:28 +01:00
Hartmut Goebel 0af94ad52f
gnu: service: Update comment.
* gnu/services/base.scm (guix-activation): Update comment.
2017-11-08 18:23:06 +01:00
Timothy Sample 3eda8dd614
services: gdm: Add environment variables.
While not an optimal solution (see comment), this makes GDM functional.

* gnu/services/xorg.scm (gdm-shepherd-service): Set PATH and XDG_DATA_DIRS
environment variables.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-07 18:09:13 +01:00
Ludovic Courtès 21b71b01e9
services: Add 'description' fields.
* gnu/services/admin.scm (rottlog-service-type)
(tailon-service-type): Add 'description' field.
* gnu/services/audio.scm (mpd-service-type): Likewise.
* gnu/services/avahi.scm (avahi-service-type): Likewise.
* gnu/services/ssh.scm (lsh-service-type)
(openssh-service-type, dropbear-service-type): Likewise.
2017-11-05 15:29:52 +01:00
nee b6d2930d1f
services: Add murmur.
* gnu/services/telephony.scm: New file.
* gnu/local.mk: Add it.
* doc/guix.texi (Telephony Services): New node.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-05 15:21:53 +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 b27ce4164a
services: gnome: Register more polkit actions.
This should allow more operations such as changing the system date and
time via the Control Center (reported at
<https://lists.gnu.org/archive/html/help-guix/2016-09/msg00059.html>),
performing "file operations" via gvfs, and interacting with processes
using the System Monitor.

* gnu/services/desktop.scm (gnome-polkit-settings): New procedure.
(gnome-desktop-service-type): Use it in POLKIT-SERVICE-TYPE extension.
2017-10-11 23:00:46 +02: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
Julien Lepiller 4b8b4418e6
services: vpn: Fix default tls-auth configuration.
* gnu/services/vpn.scm (serialize-tls-auth): Fix serialization error when
tls-auth is disabled.
2017-10-10 22:06:08 +02:00
Ludovic Courtès 60273031e8
services: Remove unneeded imported.
This caused a circular dependency.
Reported by Oleg Pykhalov <go.wigust@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-10/msg00021.html>.

* gnu/services/networking.scm: Remove unneeded import of (gnu system
base).
2017-10-08 17:43:51 +02:00
Christopher Baines 5266ff719e
services: Add MongoDB.
* gnu/services/databases.scm (%default-mongodb-configuration-file,
  %mongodb-accounts, mongodb-service-type): New variables.
  (<mongodb-configuration>): New record type.
  (mongodb-activation, mongodb-shepherd-service): New procedures.
* gnu/tests/databases.scm (%test-mongodb): New variable.
* doc/guix.texi (Database Services): Add MongoDB documentation.
2017-10-06 21:24:30 +01:00
Oleg Pykhalov 032a2760ee
gnu: services: Add cgit.
* gnu/services/version-control.scm
(<cgit-configuration-file>, <cgit-configuration>): New record types.
(cgit-configuration-robots-string, cgit-activation,
cgit-configuration-nginx-config): New procedures.
(%cgit-configuration-nginx, cgit-service-type): New variables.
* gnu/tests/version-control.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Version Control): Document the cgit service.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-10-03 17:07:54 +02:00
Oleg Pykhalov 4d14808af4
services: web: Add try-files for the nginx-service-type.
* gnu/services/web.scm (<nginx-server-configuration>): Add
  nginx-server-configuration-try-files.
(emit-nginx-server-config): Use it.
* doc/guix.texi (Web Services): Document it.
2017-09-28 20:37:40 +02:00
Jan Nieuwenhuizen 326f6ef10f
services: cuirass: Add host option.
* gnu/services/cuirass.scm (<cuirass-configuration>): Add host option.
(cuirass-shepherd-service): Pass host option.
* doc/guix.texi (Continuous Integration): Document it.
2017-09-26 18:15:41 +02:00
Oleg Pykhalov 9db7e9be59
gnu: Add rsync service.
* doc/guix.texi (Networking Services): Add rsync service documentation.
* gnu/services/rsync.scm (<rsync-configuration>): New file.
* gnu/tests/rsync.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new files.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2017-09-23 21:07:27 +01:00
Ludovic Courtès 94d2a25091
services: network-manager: Add support for VPN plug-ins.
* gnu/services.scm (directory-union): Export.
* gnu/services/networking.scm (<network-manager-configuration>)[vpn-plugins]:
New field.
(vpn-plugin-directory, network-manager-environment): New procedure.
(network-manager-shepherd-service): Pass #:environment-variables to
'make-forkexec-constructor'.
(network-manager-service-type): Add SESSION-ENVIRONMENT-SERVICE-TYPE
extension.
* doc/guix.texi (Networking Services): Document it.
2017-09-22 00:05:08 +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
Andy Wingo 23290064c2
gnu: services: Add modesetting driver to xorg configuration path.
* gnu/services/xorg.scm (xorg-configuration-file): Add drivers path from
  xorg-server.  This includes the modesetting driver.

Signed-off-by: Andy Wingo <wingo@igalia.com>
2017-09-20 15:40:31 +02:00
Ludovic Courtès 3f0de257c4
services: networking: Add descriptions.
* gnu/services/networking.scm (static-networking-service-type)
(ntp-service-type, inetd-service-type, tor-service-type)
(tor-hidden-service-type, bitlbee-service-type)
(wicd-service-type, network-manager-service-type)
(connman-service-type, openvswitch-service-type): Add 'description'
field.
* po/packages/POTFILES.in: Add gnu/services/networking.scm.
2017-09-16 17:47:46 +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
Jan Nieuwenhuizen 1c05aab473
gnu: cuirrass: Default port to 8081.
* gnu/services/cuirass.scm (<cuirass-configuration>): Default port to 8081.
  Fixes conflict with guix-publish default.
* doc/guix.texi (Continuous Integration): Update.
2017-09-13 18:33: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 cf42428a4a
services: elogind: Add default value.
* gnu/services/desktop.scm (elogind-service-type)[default-value]: New
field.
2017-09-08 00:11:21 +02:00
Tobias Geerinckx-Rice 352a5b639b
services: web: Fix nginx-service-type's ‘file’ procedure.
* gnu/services/web.scm (nginx-activation, nginx-shepherd-service): Replace
references to non-existent ‘config-file’ with ‘file’.
* doc/guix.texi (Web Services): Likewise.
2017-09-05 20:57:14 +02:00
Maxim Cournoyer b9f67d6dda
services: Add auto-enable? parameter to the bluetooth-service.
* gnu/services/desktop.scm (bluetooth-configuration): New record.
(bluetooth-shepherd-service): Use it.
(bluetooth-directory): New method.
(bluetooth-service-type): Use it to extend the etc-service-type service.
(bluetooth-service): Add `auto-enable?' parameter.
* doc/guix.texi (Desktop Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-09-04 15:41:24 +02:00
Ludovic Courtès 4110fbc6dd
services: '%desktop-services' uses NetworkManager instead of Wicd.
Discussed at
<https://lists.gnu.org/archive/html/guix-devel/2017-08/msg00277.html>.

* gnu/services/desktop.scm (%desktop-services): Remove call to
'wicd-service'.  Add instances of NETWORK-MANAGER-SERVICE-TYPE and
WPA-SUPPLICANT-SERVICE-TYPE.
* doc/guix.texi (Networking Services): Document
'network-manager-service-type' as being part of '%desktop-services'.
(Desktop Services): Replace Wicd with NM.
2017-09-03 00:52:17 +02:00
Peter Mikkelsen b6dc69af1d
services: mpd: Remove the mpd-file field.
Since MPD switches user, the pid-file must be in a writable dir.  This
is now always /var/run/mpd/(user)/pid.

* gnu/services/audio.scm (mpd-service-type): Add a activation-service
extension.
(<mpd-configuration>)[pid-file]: Remove.
(mpd-service): Rename to...
(mpd-shepherd-service): ... this.
(mpd-file-name, mpd-service-activation): New procedure.
* doc/guix.texi (Audio Services): Document the changes.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-08-31 14:43:26 +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 6e99c01b4d
gnu: Add draft of gdm service.
* gnu/services/xorg.scm (%gdm-accounts, <gdm-configuration>)
(gdm-etc-service, gdm-pam-service, gdm-shepherd-service, gdm-service-programs)
(gdm-service-type, gdm-service): New public variables.  Not yet working.
2017-08-25 16:01:56 +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
Andy Wingo 92753a8bad
gnu: services: Refactor to separate X and startx wrappers.
* gnu/services/xorg.scm (xorg-wrapper): New public function.
(xorg-start-command): Use xorg-wrapper.
2017-08-25 16:01:56 +02:00
Andy Wingo 063c608261
gnu: Add AccountsService service to desktop services.
* doc/guix.texi (Desktop Services): Add accountsservice-service.
* gnu/services/desktop.scm (%accountsservice-activation):
(accountsservice-service-type): New public variables.
(%desktop-services): Add accountsservice-service.
2017-08-25 16:01:56 +02:00
Ryan Moe e6051057ab
services: Add libvirt services
* gnu/services/virtualization.scm: New file.
* doc/guix.texi (Virtualization Services): Document it.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2017-08-23 12:47:24 +01:00
Ludovic Courtès 7d14082d56
services: herd: Actions return a list of results.
Fixes a regression introduced in
0642838b2e.

* gnu/services/herd.scm (invoke-action): Explain that we get a list of
results.
(current-services): Expect a list of result and use the first one.
(unload-service, %load-file, eval-there): Likewise.
2017-08-23 00:29:22 +02:00
Christopher Baines 39fc3004be
web: Remove the nginx-service procedure.
Now that the service-type has a default value, and configuration record is
accessible.

* gnu/services/web.scm (nginx-service): Remove procedure.
* doc/guix.texi (Web Services): Update and improve NGinx documentation.
2017-08-22 17:49:05 +01:00
Christopher Baines ad4cc435e8
web: Add default-value for the nginx-service-type.
* gnu/services/web.scm (nginx-service-type)[default-value]:
  Use (nginx-configuration).
2017-08-22 17:49:00 +01:00
Christopher Baines e4b729f89c
web: Export more nginx related procedures, macros and record types.
This makes it possible to work with the configuration of the NGinx service
programatically.

* gnu/services/web.scm (<nginx-configuration>, <nginx-server-configuration>,
  <nginx-upstream-configuration>, <nginx-location-configuration>,
  <nginx-named-location-configuration>): Export NGinx related record
  types.
  (nginx-configuration-*, nginx-server-configuration-*,
  nginx-upstream-configuration-*, nginx-location-configuration-*,
  nginx-named-location-configuration-*): Export NGinx related record
  procedures.
  (nginx-configuration): Export NGinx related record macro.
2017-08-22 17:48:54 +01:00
Christopher Baines f2d7a492df
web: Check for the existance of SSL related files.
This adds back the previous behaviour of the nginx-service-type, where the
service would check at the time when the configuration is generated if the SSL
certificate and certificate key file exists.

* gnu/services/web.scm (emit-nginx-server-config): Add back check for SSL
  related files.
2017-08-17 18:32:27 +01:00
Andy Wingo c9aa261be4
gnu: services: Nginx configs can reference store
* gnu/services/web.scm (config-domain-strings, config-index-strings): Emit
lists instead of strings.
(emit-nginx-location-config, emit-nginx-server-config)
(emit-nginx-upstream-config): Rename from nginx-location-config,
default-nginx-server-config, and nginx-upstream-config.  Emit lists instead of
strings.
(flatten): New helper.
(default-nginx-config): Use flatten helper to write nginx conf.  This allows
location configs to reference store values.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2017-08-17 18:32:23 +01:00
Christopher Baines 6230e155af
gnu: Fix memcached service startup.
Memcached changes to the memcached user from root before writing the PID
file. This means that it must be able to write the PID file as the memcached
user.

To make this work, create the /var/run/memcached directory when the service
starts, make it owned by memcached, and change memcached to write the PID file
to /var/run/memcached/pid.

This wasn't picked up by the system test as the "service running" part was too
permissive, and only failed on an error. Instead, test the response from
calling start-service and check that the PID is a number.

* gnu/services/databases.scm (memcached-activation): New variable.
  (memcached-shepherd-service): Change PID file location.
  (memcached-service-type): Extend the activation-service-type.
* gnu/tests/databases.scm (run-memcached-test)[test]: Change the "service
  running" test to check the response from the shepherd.
2017-08-15 22:24:15 +01:00
Peter Mikkelsen 06465d2ba4
gnu: Add mpd service.
* doc/guix.texi: Add documentation.
* gnu/services/audio.scm (<mpd-configuration>): New record type.
  (mpd-service-type): New service type.
* gnu/tests/audio.scm: New file.
* gnu/local.mk: Add new files.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2017-08-13 07:36:32 +01:00
Christopher Baines 1012056625
services: admin: Simplify the handling of the Tailon debug? option.
* gnu/services/admin.scm (tailon-configuration-file-compiler): Simplify the
  handling of debug?.
2017-08-09 23:50:35 +01:00
Christopher Baines 91fdc8a574
services: Update the Tailon service for Tailon 1.3.0.
Tailon 1.3.0 (upgraded from 1.1.1) adds support for HTTP authentication.

* gnu/services/admin.scm (<tailon-configuration-file>): Add http-auth and
  users configuration values.
  (tailon-configuration-file-http-auth, tailon-configuration-file-users): New
  procedures.
  (tailon-configuration-file-compiler): Add support for the http-auth and
  users configuration options.
* doc/guix.texi (Monitoring Services): Document authentication for Tailon.
2017-08-09 23:50:31 +01:00
Christopher Baines f2d8e7f720
services: Add missing wrap-lines option to tailon.
* gnu/services/admin.scm (<tailon-configuration-file>): Add wrap-lines.
  (tailon-configuration-wrap-lines): New procedure.
  (tailon-configuration-file-compiler): Add support for wrap-lines.
* doc/guix.texi (Monitoring Services): Document the wrap-lines Tailon
  configuration option.
2017-08-09 23:50:27 +01:00
Christopher Baines 0642838b2e
services: herd: Add a stop-service procedure.
* gnu/services/herd.scm (stop-service): New procedure.
2017-08-08 20:49:08 +01:00
Christopher Baines dc7b3e5633
services: herd: Fix matching ok responses from shepherd service.
Previously the match expression case for a successful response
(where error is #f) required that the result component contained a list with a
single element.

As far as I see when looking at the responses from the shepherd, this is not
normally the case. Therefore, to avoid treating successful responses as
errors, make the match requirement more permissive, accepting any value.

* gnu/services/herd.scm (invoke-action): Change match condition for ok responses.
2017-08-08 20:48:53 +01:00
Leo Famulari 57f57a7bbf
services: ntp: Use the NTP pool via the 'guix' zone.
* gnu/services/networking.scm (%ntp-servers): Use *.guix.pool.ntp.org.
2017-07-30 20:21:36 -04:00
Ludovic Courtès 1398a43816
services: openssh: Extensions provide extra authorized keys.
* gnu/services/ssh.scm (extend-openssh-authorized-keys): New procedure.
(openssh-service-type)[compose, extend]: New fields.
* doc/guix.texi (Networking Services): Document the extension.
2017-07-30 16:23:19 +02:00
Ludovic Courtès 4892eb7c6a
services: openssh: Add 'authorized-keys' field.
* gnu/services/ssh.scm (<openssh-configuration>)[authorized-keys]: New
field.
(authorized-key-directory): New procedure.
(openssh-config-file): Honor 'authorized-keys'.
(openssh-activation): Use 'with-imported-modules'.  Make /etc/ssh
755.  Create /etc/ssh/authorized_keys.d.
* doc/guix.texi (Networking Services): Document it.
2017-07-30 16:23:19 +02:00
Ludovic Courtès 75bddb13eb
services: cuirass: Set 'GIT_SSL_CAINFO' and 'GIT_EXEC_PATH'.
Reported by Ricardo Wurmus.

* gnu/services/cuirass.scm (cuirass-shepherd-service): Pass
 #:environment-variables.
2017-07-30 16:23:19 +02:00
Christopher Baines 119fdd0d0e
services: Add memcached.
* gnu/services/databases.scm (memcached-service-type, %memcached-accounts):
  New variables.
  (<memcached-configuration>): New record type.
  (memcached-service-type): New procedures.
* gnu/tests/databases.scm: New file.
* doc/guix.texi (Database Services): Document the new memcached service.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add entry for tests/databases.scm.
2017-07-30 09:08:30 +01:00
Christopher Baines 730ed6ec8b
gnu: services: admin: Add tailon.
* gnu/services/admin.scm
  (<tailon-configuration>, <tailon-configuration-file>): New record types.
  (tailon-configuration-files-string, tailon-shepherd-service): New
  procedures.
  (%tailon-accounts, tailon-service-type: New variables.
* doc/guix.texi (Monitoring Services: Document the Tailon service.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add gnu/tests/admin.scm.
* gnu/tests/admin.scm: New file.
2017-07-29 12:45:03 +01: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
Andy Wingo a5130d10fa
gnu: Add fcgiwrap service.
* doc/guix.texi (Web Services): Add documentation.
* gnu/services/web.scm (<fcgiwrap-configuration>): New record type.
(fcgiwrap-accounts, fcgiwrap-shepherd-service): New service extensions.
(fcgiwrap-service-type): New service type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-07-26 11:00:04 +02:00
Mathieu Othacehe c800fd564b
services: cuirass: Add fallback parameter.
* gnu/services/cuirass.scm (<cuirass-configuration>)[fallback?]: New field.
(cuirass-shepherd-service): Take it into account.
* doc/guix.texi (Continuous Integration): Document it.
2017-07-21 21:46:47 +02:00
宋文武 172b3e2cc2
services: sysctl: Fix typo.
* gnu/services/sysctl.scm: Fix typo of 'make-sysctl-configuration'.
2017-07-18 20:16:03 +08:00
Ludovic Courtès 94a881178a
services: elogind: Start from the Shepherd.
Fixes <http://bugs.gnu.org/27580>.
Reported by William <w@vieta.uk>.

* gnu/services/desktop.scm (elogind-shepherd-service): New procedure.
(elogind-service-type): Extend SHEPHERD-ROOT-SERVICE-TYPE.
2017-07-11 11:11:52 +02:00
Ludovic Courtès 3e8d037b16
services: dbus, polkit: Add default value.
* gnu/services/dbus.scm (dbus-root-service-type)[default-value]: New
field.
(polkit-service-type)[default-value]: New field.
2017-07-11 00:48:51 +02:00
宋文武 296bf4d5ab
services: Add 'sysctl-service-type'.
* gnu/services/sysctl.scm: New file.
* doc/guix.texi (Miscellaneous Services): Document it.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2017-07-04 20:40:51 +08:00
Julien Lepiller f3853a259b
gnu: services: use seconds instead of duration strings.
* gnu/services/dns.scm (zone-file, knot-policy-configuration): Use numbers
instead of duration strings.
(verify-knot-policy-configuration): Fix typo.
* doc/guix.texi (DNS Services): Update documentation.
2017-06-21 19:29:57 +02:00
Ludovic Courtès 44fa0dbec7
services: network-manager: Specify a default value.
* gnu/services/networking.scm (network-manager-service-type)[default-value]:
New field.
2017-06-21 14:52:30 +02:00
Ludovic Courtès d782de172c
services: cuirass: Extend rottlog with log rotations.
* gnu/services/cuirass.scm (cuirass-log-rotations): New procedure.
(cuirass-service-type): Use it to extend ROTTLOG-SERVICE-TYPE.
2017-06-12 23:34:14 +02:00
Ludovic Courtès 254ea3f945
services: rottlog: Make extensible.
* gnu/services/admin.scm (rottlog-service-type)[compose, extend]: New
fields.
* doc/guix.texi (Log Rotation): Mention extension.
2017-06-12 23:34:14 +02:00
Ludovic Courtès 81fa2229ec
services: rottlog: Define <log-rotation> objects.
* gnu/services/admin.scm (<log-rotation>): New record type.
(syslog-rotation-config, simple-rotation-config): Remove.
(%default-rotations): Define as a list of <log-rotation> objects.
(log-rotation->config, log-rotations->/etc-entries): New procedures.
(<rottlog-configuration>)[periodic-rotations]: Remove.
[rotations]: New field.
(rottlog-etc): Use 'log-rotations->/etc-entries'.
* doc/guix.texi (Log Rotation): Update accordingly.
2017-06-12 23:34:13 +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
Julien Lepiller ba69e8f7ce
gnu: Add knot-service-type.
* gnu/services/dns.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (DNS Services): New subsubsection.
2017-05-27 10:40:24 +02:00
Marius Bakke 07bf68ed09
services: openssh: Don't depend on networking.
* gnu/services/ssh.scm (openssh-shepherd-service): Drop requirement.
2017-05-18 01:00:52 +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
Christopher Allan Webber d7fa39ccec
services: Add 'thermald-service-type'.
* gnu/services/pm.scm (<thermald-configuration>): New record type.
(thermald-shepherd-service, thermald-service-type): New variables.
* doc/guix.texi (Thermal Management): New section documenting thermald.
2017-05-14 18:56:32 -05: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 69daee23af
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance.  See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.

* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'.  Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 16:16:17 +02:00
Mathieu Othacehe 5e03b122cf
services: herd: Make %shepherd-socket-file a parameter and export it.
* gnu/services/herd.scm (%shepherd-socket-file): Make it an exported
  parameter.
(open-connection): Adapt.
2017-05-03 11:35:25 +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
Julien Lepiller fa936915ce
gnu: services: nginx: Fix key verification.
* gnu/services/web.scm (default-nginx-server-config): Fix wrong variable name.
2017-05-01 10:12:49 +02:00
Julien Lepiller 5a10cd4736
gnu: services: Create logs directory.
* gnu/services/web.scm (nginx-activation): Create logs directory so nginx can
log its startup messages before it loads its configuration.
2017-05-01 09:57:03 +02:00
Julien Lepiller 0f4740f4fa
gnu: services: nginx: Test certificate presence.
* gnu/services/web.scm (default-nginx-server-config): Test certificate
presence when https is requested at configure time.
2017-05-01 09:56:57 +02:00
Carlo Zancanaro b065f78e94
services: Make exim-service-type use mail-aliases-service-type
* gnu/services/mail.scm (exim-configuration)[aliases]: Remove field.
(exim-activation, exim-shepherd-service): Remove alias from matches.
(exim-etc): Remove procedure.
(exim-service-type): Extend mail-aliases-service-type instead of
etc-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-19 23:43:50 +02:00
Carlo Zancanaro 8d17cf1c2f
services: Add mail-aliases-service-type.
* gnu/services/mail.scm (mail-aliases-etc): New procedure.
(mail-aliases-service-type): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-19 23:43:50 +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
Julien Lepiller 54412ebfeb
services: nginx: Use mime.types.
* gnu/service/web.scm (default-nginx-config): Add 'nginx' parameter
and honor it.  Adjust callers.
2017-04-18 23:15:52 +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 ee295346ce
services: tor: Run in a container.
* gnu/services/networking.scm (tor-shepherd-service): Use (gnu build
shepherd) and use 'make-forkexec-constructor/container' instead of
'make-forkexec-constructor'.
2017-04-13 00:12:42 +02:00
Ludovic Courtès f84011d04a
services: cuirass: Wait for networking.
* gnu/services/cuirass.scm (cuirass-shepherd-service): Add 'networking'
to 'requirements'.
2017-04-05 00:53:03 +02:00
Clément Lassieur deb3618810
services: dovecot: Fix passwd and userdb 'args' types.
* gnu/services/mail.scm (passwd-configuration)[args]
(userdb-configuration)[args]: Change type from 'free-form-args' to
'space-separated-string-list'.
* doc/guix.texi (Mail Services): Document it.
2017-04-01 14:38:10 +02:00
Eric Bavier 9fc221b58c
doc: Fix typos.
* doc/guix.texi (Build Systems)[ocaml-build-system]: Fix typo.
(Log Rotation)[periodic-rotations]: ditto.
(Database Services)[redis-service-type]: ditto.
(OpenSMTPD Service)[opensmtpd-configuration]: ditto.
(VPN Services)[OpenVPN]: ditto.
(Power management Services)[tlp-configuration]: ditto.
(Git daemon service)[git-daemon-service]: ditto.
(Running GuixSD in a VM): ditto.
* gnu/services/pm.scm (tlp-configuration)[runtime-pm-blacklist]: Fix typo.
* gnu/services/vpn.scm (openvpn-client-configuration)[status]: ditto.
2017-03-31 20:55:05 -05:00
Huang Ying 9af7ecd959
services: dicod: Allow the configuration of "handlers".
* gnu/services/dict.scm (<dicod-configuration>)[handlers]: New field.
(<dicod-handler>): New record type.
(<dicod-database>): Add fields.
(dicod-configuration-file): Support convert handlers and enhanced databases.
configuration to config file.
* doc/guix.texi (Miscellaneous Services): Update accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-01 00:45:18 +02:00
Thomas Danckaert 9260b9d100
services: Add inetd-service-type.
* gnu/services/networking.scm (<inetd-configuration>, <inetd-entry>): New
record types.
(inetd-config-file, inetd-shepherd-service): New procedures.
(inetd-service-type): New variable.
* doc/guix.texi (Networking Services): Document it.
* gnu/tests/networking.scm: New file.
* gnu/local.mk: Add it.
2017-03-24 17:45:56 +01:00
Mathieu Othacehe 85ac401acf
services: openvpn: Fix a typo which was corrected in generated doc.
* gnu/services/vpn.scm (define-split-configuration): Fix typo.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2017-03-24 16:09:18 +01:00
Mathieu Othacehe bfbf6e1e10
gnu: Add tlp service.
* gnu/services/pm.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add gnu/services/tlp.scm.
* doc/guix.texi (Power management Services): New section.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2017-03-24 16:09:17 +01:00
Mathieu Othacehe d02c3c2234
services: configuration: Rewrite id procedure.
* gnu/services/configuration.scm (id): Replace it using the more concise
version found in messaging.scm.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2017-03-24 16:09:17 +01:00
Mathieu Othacehe e7c797f348
services: Factorize define-maybe macro.
* gnu/services/configuration.scm (id): New procedure extracted from
define-configuration.
(define-maybe): New exported procedure, moved from messaging.scm.
* gnu/services/messaging.scm (define-maybe): Remove it.
(id): Move declaration inside define-all-configurations which is now
the only caller procedure.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2017-03-24 16:09:17 +01: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
Clément Lassieur 12723370e5
services: openssh: Add 'subsystems' option.
* gnu/services/ssh.scm (openssh-config-file): Add it.
(<openssh-configuration>)[subsystems]: Add it.
* doc/guix.texi (Networking Services): Document it.
2017-03-21 20:49:26 +01:00
Clément Lassieur 4ca3e9b7b6
services: openssh: Cosmetic changes.
* gnu/services/ssh.scm (<openssh-configuration>): Reformat to fit in 80
columns.
2017-03-21 20:49:26 +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
Mathieu Othacehe 34d60c49cb
services: connman: Rework service.
* gnu/services/networking.scm (connman-service): Remove.
(<connman-configuration>): New record specifying the package
to be used (connman) and whether vpn plugin shall be
disabled (disable-vpn?).
(connman-configuration): New exported variable.
(connman-configuration?): New exported variable.
(connman-service-type): Export it.

* doc/guix.texi (Networking Services): Adjust accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-16 22:50:14 +01:00
Clément Lassieur 720cb10c15
services: Move configuration functions that shouldn't be factorized.
* gnu/services/configuration.scm (serialize-field, serialize-string)
(serialize-space-separated-string-list, space-separated-string-list?)
(serialize-file-name, file-name?, serialize-boolean): Move these functions...
* gnu/services/cups.scm: ...to this file.
* gnu/services/kerberos.scm: ...to this file.

Configuration syntaxes are very specific to services.  Some services may have
the same configuration syntax, but none of them is common enough to be
abstracted in configuration.scm.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2017-03-12 19:09:32 +01:00
Clément Lassieur 56aef188a2
services: dovecot: Reimplement proper configuration functions.
* gnu/services/mail.scm (uglify-field-name, serialize-field, serialize-string)
(space-separated-string-list?, serialize-space-separated-string-list)
(file-name?, serialize-file-name, serialize-boolean): Add them.

These functions were inadvertently changed while being factorized in
gnu/service/configuration.scm.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2017-03-12 19:08:50 +01:00
Clément Lassieur eba560765a
services: dovecot: Fix unix_listeners and fifo_listeners path types.
* gnu/services/mail.scm (unix-listener-configuration)[path]
(fifo-listener-configuration)[path]: Change type from 'file-name' to 'string'.
* doc/guix.texi (Mail Services): Document it.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2017-03-12 01:30:23 +01:00
Clément Lassieur f895dce41b
services: openssh: Fix 'PrintLastLog' default behaviour.
* gnu/services/ssh.scm (openssh-config-file): Add 'print-last-log?' option.
(<openssh-configuration>)[print-last-log?]: Add it.
(openssh-activation): Touch /var/log/lastlog.
* doc/guix.texi (Networking Services): Document 'print-last-log?'.

Before that, the service did not work as expected because /var/log/lastlog did
not exist.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-03-10 19:23:45 +01:00
Clément Lassieur 1806a670f0
services: openssh: Remove deprecated options.
* gnu/services/ssh.scm (openssh-config-file): Remove them.
(<openssh-configuration>)[rsa-authentication?]: Remove it.
(<openssh-configuration>)[protocol-number]: Remove it.
* doc/guix.texi (Networking Services): Remove them.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-03-10 19:23:45 +01:00
Clément Lassieur 563c5d42c9
services: openssh: Enable PAM.
* gnu/services/ssh.scm: (openssh-pam-services): New procedure.
(openssh-service-type): Use it to extend PAM-ROOT-SERVICE-TYPE.
(<openssh-configuration>)[challenge-response-authentication?]: New field.
(<openssh-configuration>)[use-pam?]: New field.
(openssh-config-file): Add them.
* doc/guix.texi (Networking Services): Document them.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-03-10 19:23:43 +01:00
Carlo Zancanaro 82ccc499f7
services: Add exim-service-type.
* gnu/services/mail.scm (<exim-configuration>): New record type.
(exim-computed-config-file, exim-shepherd-service, exim-activation, exim-etc,
exim-profile): New procedures.
(exim-service-type, %exim-accounts): New variables.
* doc/guix.text (Mail Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-10 14:48:05 +01:00
Ludovic Courtès 1099988904
services: prosody: Use 'id' to introduce unhygienic top-level identifiers.
* gnu/services/messaging.scm (define-all-configurations): Use 'id' to
introduce raw/literal/unhygienic top-level identifiers.  Fixes
compilation with Guile 2.2.
2017-03-08 23:42:52 +01:00
Ludovic Courtès 5d1ee4d7bc
services: prosody: Make sure 'id' is available at expansion time.
* gnu/services/messaging.scm (id): Use 'define-syntax-rule' instead of
'define' to make sure 'id' is available at expansion time.
2017-03-08 23:42:52 +01:00
Leo Famulari 23f22ba8af
services: openssh: Parameterize the OpenSSH package used by the service.
* gnu/services/ssh.scm (<openssh-configuration>)[openssh]: New field.
(openssh-activation, openssh-shepherd-service): Use it.
2017-03-06 13:39:29 -05: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
Alex Kost 47ddf3e5f0
services: ssh: Remove 'openssh-service' exported symbol.
This is a followup to commit d8f3128119.
Reported by thomasd on #guix.

* gnu/services/ssh.scm: Do not export 'openssh-service' as it does not
exist.
2017-03-02 11:50:57 +03: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
Marius Bakke b35f442e62
gnu: Remove xf86-video-modesetting.
This is part of xorg-server since version 1.17:

https://cgit.freedesktop.org/xorg/xserver/commit/?id=35dc7c75150733dbcef8a18b6796f49a7c48ebee

* gnu/packages/xorg.scm (xf86-video-modesetting): Remove variable.
* gnu/services/xorg.scm (xorg-configuration-file, %default-xorg-modules):
Adjust accordingly.
2017-02-19 23:29:38 +01:00
宋文武 c32d02fe7e
services: Add openvswitch-service-type.
* gnu/services/networking.scm (<openvswitch-configuration>): New record type.
(openvswitch-activation, openvswitch-shepherd-service): New procedures.
(openvswitch-service-type): New variable.
* doc/guix.texi (Networking Services): Document it.
2017-02-12 14:48:34 +08:00
Clément Lassieur 533bc51469
tests: Add 'prosody-service-type' test.
* gnu/tests/messaging.scm: New file.
* gnu/services/messaging.scm: New exported procedure.
  (<shepherd-service>)[provision]: Add 'xmpp-daemon'.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-02-10 23:39:45 +01:00
Clément Lassieur 750a423996
services: shepherd: Replace spaces with hyphens in file names.
This fixes a bug whereby names of files defining services would be
invalid if 'provisions' contained more than one element.

* gnu/services/shepherd.scm (shepherd-service-file-name): Update
'match-lambda' accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-02-08 16:17:05 +01: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 a062b6ca99
services: bitlbee: Run in a container.
* gnu/services/networking.scm (bitlbee-shepherd-service): Wrap in
'with-imported-modules' and add 'modules' field.  Use
'make-forkexec-constructor/container' and pass #:mappings.
2017-02-07 00:08:11 +01:00
Ludovic Courtès b9a5efa596
services: bitlbee: Read the PID file.
* gnu/services/networking.scm (bitlbee-shepherd-service): Pass
  #:pid-file to 'make-forkexec-constructor'.
2017-02-07 00:08:10 +01:00
Mathieu Othacehe eb122280a0
services: cuirass: Add load-path to cuirass configuration
* gnu/services/cuirass.scm (<cuirass-configuration>): Add load-path field.
(cuirass-shepherd-service): Honor it.
* doc/guix.texi (Continuous Integration): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-02-02 09:04:40 +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