Commit Graph

1321 Commits

Author SHA1 Message Date
Maxim Cournoyer b7cbca221f
Merge branch 'version-1.3.0' 2021-05-11 22:42:59 -04:00
Ludovic Courtès f903bb7741
services: configuration: Export 'no-serialization' syntactic keyword.
This is a followup to 3f9a12dc08.

* gnu/services/configuration.scm (no-serialization): New variable.
2021-05-08 15:06:31 +02:00
Maxim Cournoyer a9a67da573
services: docker: Disable configuration serialization.
* gnu/services/docker.scm (serialize-boolean): Delete procedure.
(docker-configuration) <no-serialization>: New syntactic keyword.
2021-05-08 01:04:31 -04:00
Maxim Cournoyer dd0826fbf3
services: configuration: Fix %location accessor name.
The non-hygienic binding of the source location accessor was set to
'-location'; in modules where multiple configurations were defined, it would
cause compilation warnings such as:

    gnu/services/mail.scm:175:0: warning: shadows previous definition of
    `%-location-procedure' at gnu/services/mail.scm:165:0

* gnu/services/configuration.scm (define-configuration-helper) <id>: Add a
missing #'stem argument to use the configuration name as a prefix to the
location accessor identifier.
2021-05-08 01:04:01 -04:00
Xinglu Chen b3e99d3399
services: configuration: Allow specifying a custom serializer.
In some cases, rather than globally disabling serialization, it may be more
appropriate to disable or otherwise alter the serialization procedure of a
specific field.  In large module, multiple configurations may also exist that
would need to alter the default serialization procedure, which is named after
the field type.  Being able to specify a per-field serialization procedure
provides more flexibility.

* gnu/services/configuration.scm (define-configuration): Add an optional
pattern variable to allow specifying a custom serialization procedure.
(define-configuration-helper) <field-serializer>: Use it to transform the
syntax.
(empty-serializer): New procedure.
(serialize-package): Alias to ‘empty-serializer’.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-05-08 00:50:39 -04:00
Maxim Cournoyer 3f9a12dc08
services: configuration: Allow disabling serialization.
Serialization is not always useful, for example when deriving command line
arguments from a configuration.  This change provides a way to turn it off,
which removes the need to define a bunch of dummy serialization procedures.

Credit goes to Andrew Gierth (RhodiumToad) from #guile for providing the
solution.  Thank you!

* gnu/services/configuration.scm (define-configuration-helper): New procedure.
(define-configuration) <no-serialization>: New syntactic keyword.  Use it in a
new pattern.  Refactor the macro so that it makes use of the above helper
procedure.
2021-05-08 00:50:39 -04:00
Maxim Cournoyer 1a2704add3
services: configuration: Avoid a compilation warning.
This resolves a compilation warning introduced with commit bb716e8d9d.

* gnu/services/configuration.scm (configuration->documentation): Use display
to print the string instead of format.
2021-05-08 00:50:38 -04:00
Maxim Cournoyer bb716e8d9d
services: configuration: Add a new helper to ease generating documentation.
The original (undocumented) procedure to generate the doc has a difficult to
grasp interface; add a simpler one on top of it.

* gnu/services/configuration.scm (configuration->documentation): New procedure.
2021-05-07 08:59:31 -04:00
Xinglu Chen d1caabbce7
services: configuration: Support fields without default values.
Not all fields in a configuration have a sensible default value.  This changes
makes it possible to omit a default value for a configuration field, requiring
the user to provide a value.

* gnu/services/configuration.scm (configuration-missing-field): New procedure.
(define-configuration): Make default value optional.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-05-07 08:57:45 -04:00
Maxim Cournoyer b39c4e18f2
services: spice-vdagent: Clear the socket file prior to starting.
This fixes the following issue where spice-vdagent would fail to start if the
spice-vdagent-sock socket file already existed:

  spice-vdagentd: Fatal could not create the server socket
  /run/spice-vdagentd/spice-vdagent-sock: Error binding to address: Address
  already in use

The requirement is also modified to depend on dbus-system, a cue taken from
upstream's own systemd service file (see 'data/spice-vdagentd.service' in the
sources).

* gnu/services/spice.scm (spice-vdagent-activation): Delete procedure.
(spice-vdagent-shepherd-service): Fix indentation.
[requirement]: Replace udev by dbus-system.
[start]: Ensure the spice-vdagentd run-time directory exists and that the
spice-vdagent-sock socket file does *not* exist before forking the daemon.
2021-05-06 16:51:49 -04:00
Alexey Abramov 0d6eb69266
services: dovecot: Add ‘managesieve-sieve-capability’ option.
* gnu/services/mail.scm (protocol-configuration): Add a
‘managesieve-sieve-capability’ field.
* doc/guix.texi (Mail Services): Document it.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2021-05-06 11:31:48 +02:00
Alexey Abramov 6e05920cef
services: dovecot: Add ‘managesieve-notify-capability’ option.
* gnu/services/mail.scm (protocol-configuration): Add a
‘managesieve-notify-capability’ field.
* doc/guix.texi (Mail Services): Document it.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2021-05-06 11:27:00 +02:00
Alexey Abramov 0fd5bdcaf6
services: dovecot: Add ‘imap-metadata?’ protocol configuration option.
* gnu/services/mail.scm (protocol-configuration): Add an ‘imap-metadata?’
setting to enable IMAP METADATA support in the ‘imap’ protocol.
* doc/guix.texi (Mail Services): Document it.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2021-05-06 11:08:52 +02:00
Alexey Abramov 5b5c50961f
services: dovecot: Add ‘mail-attribute-dict’ configuration option.
* gnu/services/mail.scm (dovecot-configuration): Define a
‘mail-attribute-dict’ directive for IMAP METADATA storage.
* doc/guix.texi (Mail Services): Document it.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2021-05-06 11:08:52 +02:00
Maxim Cournoyer 6b0704339d
services: Fix the spice-vdagent service.
* gnu/services/spice.scm (spice-vdagent-activation): Update runtime directory
from /var/run/spice-vdagentd to /run/spice-vdagentd.
(spice-vdagent-service-type): Specify a default value and fix indentation.
2021-05-05 16:31:06 -04:00
Christopher Baines c1131911a7
services: guix-build-coordinator: Fix queue builds state directory.
This service doesn't create a PID file, but it does write a file with the
processed commits in it, so create a directory to contain that.

* gnu/services/guix.scm (guix-build-coordinator-queue-builds-activation):
Ensure /var/cache/guix-build-coordinator-queue-builds exists.
2021-05-02 09:56:42 +01:00
methuselah-0 3802bb0ba0
services: mysql: Add extra-environment as configuration option.
* gnu/services/databases.scm (mysql-configuration): Add extra-environment
(mysql-service): Use #:log-file and #:environment-variables
* doc/guix.texi: Document it.

Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
2021-04-27 20:45:35 +02:00
Oleg Pykhalov 43a7724040
services: nix: Add /bin/sh to build-sandbox-paths.
Fixes <https://bugs.gnu.org/46297>.

* gnu/services/nix.scm (nix-service-etc): Add /bin/sh to build-sandbox-paths.
2021-04-26 20:03:55 +03:00
B. Wilson 2c93df3d11
services: Add a service for rasdaemon.
* gnu/services/linux.scm (rasdaemon-configuration, rasdaemon-configuration?,
rasdaemon-configuration-record?, rasdaemon-service-type): New variables.
* doc/guix.texi (Linux Services): Document it.

Signed-off-by: Leo Famulari <leo@famulari.name>
2021-04-24 12:30:01 -04:00
Christopher Baines 311e4b005b
services: guix-build-coordinator: Fix queue builds default config.
Use the default client port rather than the default agent communication port
for the queue builds script.

* gnu/services/guix.scm (<guix-build-coordinator-queue-builds-configuration>):
Change coordinator default.
2021-04-23 15:05:38 +01:00
Christopher Baines c15d31ac10
services: guix-build-coordinator: Remove incorrect pid file.
The queue builds script doesn't create a pid file, so don't have the shepherd
expect to find one.

* gnu/services/guix.scm (guix-build-coordinator-queue-builds-shepherd-services):
Remove #:pid-file.
2021-04-23 13:40:25 +01:00
Christopher Baines 51201d636a
services: guix-build-coordinator: Fix service activation parts.
Don't hardcode usernames, as these are in the config. Also fix the %user being
missing from the queue-builds service activation.

* gnu/services/guix.scm (guix-build-coordinator-activation,
guix-build-coordinator-agent-activation): Use config for the user name.
(guix-build-coordinator-queue-builds-activation): Define %user.
2021-04-23 13:38:49 +01:00
Christopher Baines e2ab6fb0dd
services: guix-build-coordinator: Add max-1min-load-average option.
To the agent configuration.

* gnu/services/guix.scm (<guix-build-coordinator-agent-configuration>): New
field, max-1min-load-average.
(guix-build-coordinator-agent-configuration-max-1min-load-average): New
procedure.
(guix-build-coordinator-agent-shepherd-services): If set, include the
max-1min-load-average in the agent arguments.
2021-04-23 11:03:23 +01:00
Guillaume Le Vaillant 3313f61e18
services: wireguard: Add keep-alive support.
* gnu/services/vpn.scm (<wireguard-peer>): Add 'keep-alive' field.
  (wireguard-configuration-file): Use it.
* doc/guix.texi (VPN Services): Document it.
2021-04-20 14:32:53 +02:00
Mathieu Othacehe 3f3d66377c
services: cuirass: Use "/tmp" database host.
This is a follow-up of c311147bd1.

* gnu/services/cuirass.scm (%cuirass-default-database): Use "/tmp" database
host.
2021-04-14 16:09:35 +02:00
Leo Prikler 4dff6ecde8
Revert "services: mysql: Add extra-environment as configuration option."
This reverts commit f3626119d7.
This commit inadvertently broke a string freeze.  Let's be nice to our
translators and not do that.
2021-04-14 00:59:52 +02:00
Mathieu Othacehe ea89fcb0da
services: postgresql: Use "/tmp" host directory.
This is a follow-up of c311147bd1.

* gnu/services/databases.scm (<postgresql-role-configuration>)[host]: Set to
"/tmp" which the default Postgresql socket directory.
2021-04-13 19:31:20 +02:00
methuselah-0 f3626119d7
services: mysql: Add extra-environment as configuration option.
* gnu/services/databases.scm (mysql-configuration): Add extra-environment
(mysql-service): Use #:log-file and #:environment-variables
* doc/guix.texi: Document it.

Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
2021-04-13 18:47:32 +02:00
Christopher Baines c311147bd1
services: postgresql: Change service default socket directory.
Fixes <https://bugs.gnu.org/46737>.

PostgreSQL running with a different socket directory to the default one in the
package itself breaks some services, this commit restores the previous
behaviour where PostgreSQL by default will run with a socket directory that
matches the default used by PostgreSQL packaged for Guix.

Switching to a different default value can happen, but only alongside changing
the PostgreSQL package.

* gnu/services/databases.scm (<postgresql-config-file>)[socket-directory]:
Change default to #false.
* doc/guix.texi (Database Services): Update documentation, and specify a
different value for disabling connections via sockets.
* gnu/tests/guix.scm (%guix-data-service-os): Use default PostgreSQL
behaviour.
* gnu/tests/monitoring.scm (%zabbix-os): Likewise.
* gnu/tests/web.scm (patchwork-os): Likewise.

Signed-off-by: Leo Famulari <leo@famulari.name>
2021-04-12 19:12:46 -04:00
Ludovic Courtès 4d0d6d8626
services: ipfs: Tweak description.
* gnu/services/networking.scm (ipfs-service-type)[description]: Avoid
abbreviation.
2021-04-12 18:44:09 +02:00
Maxime Devos 2978832b92
services: Add ipfs-service-type
* gnu/services/networking.scm (ipfs-service-type)
  (%ipfs-home-mapping, %ipfs-environment)
  (%ipfs-accounts, %ipfs-home): New variables.
  (ipfs-configuration, ipfs-configuration?)
  (ipfs-configuration-package, ipfs-configuration-gateway)
  (ipfs-configuration-api, ipfs-shepherd-service)
  (ipfs-binary, %ipfs-activation): New procedures.
* doc/guix.texi (Networking Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-12 18:42:22 +02:00
Tobias Geerinckx-Rice d2f2c09d27
services: git-daemon: Fix typo in docstring.
* gnu/services/version-control.scm (git-daemon-service): Fix docstring
typo.
2021-04-10 14:11:26 +02:00
Christopher Baines eda4bb4f16
services: Add Laminar.
* gnu/services/ci.scm: New file.
* gnu/tests/ci.scm: New file.
* doc/guix.texi (Laminar): Document the Laminar service.
2021-04-09 11:59:58 +01:00
Alexey Abramov 5a6e27bfbd
services: dovecot: Fix serialization of a free-form-args arguments.
* gnu/services/mail.scm (serialize-free-form-args): Change destination and
return a string containing the formated text.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-06 23:59:47 +02:00
Ludovic Courtès 58beda0121
services: guix-publish: Add zstd compression by default.
That way, the default config with (advertises? #t) and without a cache
will offer zstd-compressed substitutes, which should lead to much higher
throughput than gzip.

* gnu/services/base.scm (default-compression): When
'guix-publish-configuration-cache' returns true, use higher level
compression ratios.  Add "zstd".
* doc/guix.texi (Base Services): Mention zstd.
2021-04-03 22:08:33 +02:00
qblade aa03d32eb1
services: kmscon: Add font-engine and font-size fields.
* gnu/services/base.scm (<kmscon-configuration>): Add font-engine and
font-size fields.
(kmscon-service-type): Honor them.
* doc/guix.texi (Base Services): Document them.
2021-04-01 13:40:09 +02:00
Christopher Baines 264f7189e8
gnu: services: web: Have fcgiwrap log to a file.
This makes it easier to access the output.

* gnu/services/web.scm (fcgiwrap-shepherd-service): Pass #:log-file to
make-forkexec-constructor.
2021-04-01 09:01:52 +01:00
Christopher Baines 190912cb8e
gnu: services: web: Cleanup whitespace.
Replace tabs with spaces, and delete trailing whitespace.

* gnu/services/web.scm: Cleanup whitespace.
2021-04-01 09:01:50 +01:00
muradm 4f547c50f9
services: sysctl: Export <sysctl-configuration> record field accessors.
* gnu/services/sysctl.scm (sysctl-configuration-sysctl)
(sysctl-configuration-settings): Export.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-31 15:36:49 +02:00
Valentin Herrmann fe0826d5c9
services: xorg: Export %default-xorg-server-arguments.
* gnu/services/xorg.scm (%default-xorg-server-arguments): Export.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-31 15:36:49 +02:00
Ludovic Courtès 3104a743f9
services: rottlog: Add /var/log/mcron.log to '%default-rotations'.
Fixes <https://bugs.gnu.org/47436>.
Reported by Leo Famulari <leo@famulari.name>.

* gnu/services/admin.scm (%rotated-files): Add "/var/log/mcron.log".
2021-03-29 23:33:41 +02:00
Mathieu Othacehe 3c9a353849
services: cuirass: Set default port values.
* gnu/services/cuirass.scm (<cuirass-remote-server-configuration>,
<cuirass-configuration>): Set default port values.
2021-03-23 20:30:49 +01:00
Mathieu Othacehe eda735fb61
services: cuirass: Adapt to Cuirass 1.0.
* gnu/services/cuirass.scm (cuirass-shepherd-service,
cuirass-remote-worker-shepherd-service): Adapt to Cuirass 1.0.
2021-03-23 16:47:48 +01:00
Leo Famulari 898489f48e
services: Enable "protected hardlinks" and "protected symlinks" by default.
References:

https://sysctl-explorer.net/fs/protected_hardlinks/
https://sysctl-explorer.net/fs/protected_symlinks/

* gnu/services/sysctl.scm (%default-sysctl-settings): New public variable.
(<sysctl-configuration>): Use %default-sysctl-settings as the default value.
* gnu/services/base.scm (%base-services): Add sysctl-service-type.
* doc/guix.texi (Miscellaneous Services): Document the new defaults.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-18 12:17:33 +01:00
Léo Le Bouter 097cf21d1d
gnu: Remove MongoDB.
mongodb 3.4.10 has unpatched CVEs and mongodb 3.4.24 has some files in the
release tarball under the SSPL, therefore we cannot provide mongodb while
upholding to good security standards.

It turns out feff80cec3 was right since while
the main license file wasnt altered to SSPL, some files in the tree contain
SSPL headers.

* gnu/packages/databases.scm (go-gopkg.in-mgo.v2): Remove.
* gnu/packages/databases.scm (mongo-tools): Remove.
* doc/guix.texi (mongodb-service-type): Remove.
* gnu/tests/databases.scm (%test-mongodb, %mongodb-os, run-mongodb-test):
Remove.
* gnu/services/databases.scm (mongodb-configuration, mongodb-configuration?,
mongodb-configuration-mongodb, mongodb-configuration-config-file,
mongodb-configuration-data-directory, mongodb-service-type,
%default-mongodb-configuration-file, %mongodb-accounts, mongodb-activation,
mongodb-shepherd-service): Remove.
* gnu/packages/databases.scm (mongodb): Remove.
2021-03-16 11:05:24 +01:00
Maxim Cournoyer 77c2f4e206
services/qemu-binfmt: Use the F flag and the static output of QEMU.
Fixes <https://issues.guix.gnu.org/36117>.

Before this change, the 'binfmt_misc' entries registered for QEMU would not be
usable in container contexts outside of guix-daemon (without manually bind
mounting file names).

For example:

$ docker run --rm arm32v7/debian true
standard_init_linux.go:207: exec user process caused "no such file or directory"

After this change, any container can make use of the QEMU binfmt_misc
registrations, as their corresponding QEMU static binaries are fully
pre-loaded by the kernel.

* gnu/services/virtualization.scm (<qemu-platform>): Define using
'define-record-type*'.
[flags]: New field, which defaults to "F" (fix binary).
(%i386, %i486, %alpha, %arm, %armeb, %sparc, %sparc32plus, %ppc, %ppc64)
(%ppc64le, %m68k, %mips, %mipsel, %mipsn32, %mipsn32el, %mips64, %mips64el)
(%riscv32, %riscv64, %sh4, %sh4eb, %s390x, %aarch64, %hppa): Adjust.
(qemu-binfmt-guix-chroot): Remove variable.
(qemu-binfmt-service-type): Remove the qemu-binfmt-guix-chroot extension.
* gnu/services/qemu-binfmt (qemu-platform->binfmt):  Use the static output of
QEMU.
* doc/contributing.texi (Submitting Patches): Update doc.
* doc/guix.texi (Virtualization Services): Update doc.
2021-03-15 18:00:35 -04:00
Maxime Devos 520bac7ed0
services: Prevent following symlinks during activation.
This addresses a potential security issue, where a compromised
service could trick the activation code in changing the permissions,
owner and group of arbitrary files.  However, this patch is
currently only a partial fix, due to a TOCTTOU (time-of-check to
time-of-use) race, which can be fixed once guile has bindings
to openat and friends.

Fixes: <https://lists.gnu.org/archive/html/guix-devel/2021-01/msg00388.html>

* gnu/build/activation.scm: new procedure 'mkdir-p/perms'.
* gnu/services/authentication.scm
  (%nslcd-activation, nslcd-service-type): use new procedure.
* gnu/services/cups.scm (%cups-activation): likewise.
* gnu/services/dbus.scm (dbus-activation): likewise.
* gnu/services/dns.scm (knot-activation): likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-10 18:01:47 +01:00
Mathieu Othacehe 6c883d0f1d
services: cuirass: Remove simple cuirass configuration.
The Cuirass configuration has been simplified so that this is no longer
needed.

* gnu/services/cuirass.scm (<build-manifest>, <simple-cuirass-configuration>,
simple-cuirass-configuration->specs): Remove them.
2021-03-10 09:05:02 +01:00
Mathieu Othacehe 0be2474d42
services: cuirass: Do not create the database directory.
Fixes: <https://issues.guix.gnu.org/46683>.

* gnu/services/cuirass.scm (cuirass-activation): Since the PostgreSQL switch,
it is no longer needed to create the database directory.
2021-03-10 08:49:48 +01:00
Christopher Baines c6c48494e3
services: guix-build-coordinator: Add dynamic auth with file record.
* gnu/services/guix.scm (guix-build-coordinator-agent-dynamic-auth-with-file,
guix-build-coordinator-agent-dynamic-auth-with-filen?,
guix-build-coordinator-agent-dynamic-auth-with-file-agent-name,
guix-build-coordinator-agent-dynamic-auth-with-file-token-file): New procedures.
(guix-build-coordinator-agent-shepherd-services): Handle new dynamic auth with
file record.
* doc/guix.texi (Guix Build Coordinator): Document the new dynamic auth with
file record.
2021-03-05 09:29:58 +00:00