Commit graph

1487 commits

Author SHA1 Message Date
Ludovic Courtès
eeb8ac43c8
services: shepherd: Do not unload transient services.
Fixes <https://issues.guix.gnu.org/54812>.

Starting with Shepherd 0.9.0 and the use of 'make-inetd-constructor' in
commit 808b9e8504, systems might be
running transient Shepherd services such as those corresponding to SSH
connections.  Before this change, 'shepherd-service-upgrade' would have
those transient services in the list of services to unload; concretely,
that would lead all SSH connections to be closed upon 'guix system
reconfigure'.

* gnu/services/shepherd.scm (shepherd-service-upgrade): Remove transient
services to TO-UNLOAD.
2022-04-10 00:17:40 +02:00
Ludovic Courtès
a2c759c830
services: herd: Report whether a service is transient.
* gnu/services/herd.scm (<live-service>)[transient?]: New field.
(current-services): Check the value of 'transient?'.  Call
'resolve-transients'.
(resolve-transients): New procedure.
2022-04-10 00:17:40 +02:00
Ludovic Courtès
0996d48d0e
services: rottlog: Keep fewer "guix-daemon.log" files.
* gnu/services/admin.scm (%default-rotations): For "guix-daemon.log",
add 'options' field.
2022-04-09 00:30:40 +02:00
Ludovic Courtès
808b9e8504
services: openssh: Start as an inetd service.
* gnu/services/ssh.scm (openssh-shepherd-service): Use
'make-inetd-constructor' when it is defined.
(<openssh-configuration>)[max-connections]: New field.
* gnu/tests/ssh.scm (run-ssh-test)["sshd PID"]: Adjust to cope with
PID-FILE being #f.
* gnu/tests/ssh.scm (%test-openssh): Pass #f as the 'pid-file'
argument.
* doc/guix.texi (Networking Services): Document 'max-connections'.
2022-04-07 00:08:56 +02:00
Ludovic Courtès
400c9ed3d7
services: shepherd: Default to version 0.9.
* gnu/services/shepherd.scm (scm->go): Define 'shepherd&co' and pass it
to 'with-extensions'.
(shepherd-configuration-file): Call 'start-in-the-background' when it is
defined.
(<shepherd-configuration>)[shepherd]: Default to SHEPHERD-0.9.
* gnu/system.scm (hurd-default-essential-services): Use SHEPHERD-0.8.
2022-04-07 00:08:56 +02:00
Attila Lendvai
9ef6d80ef4
services: messaging: Fix two copy-paste mistakes; avoid warnings.
* gnu/services/messaging.scm (file-name-list, file-object-list): Fix
name in 'define-maybe' instances.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-04-05 20:41:41 +02:00
Ludovic Courtès
e692dc632c
services: Add 'log-cleanup' service to '%base-services' for build logs.
* gnu/services/base.scm (%base-services): Add 'log-cleanup-service-type'
instance.
* doc/guix.texi (Log Rotation): Add example and mention '%base-services'.
2022-04-04 22:58:03 +02:00
Ludovic Courtès
3b9b3b4931
services: Add 'log-cleanup-service-type'.
* gnu/services/admin.scm (<log-cleanup-configuration>): New record
type.
(log-cleanup-program, log-cleanup-mcron-jobs): New procedures.
(log-cleanup-service-type): New variable.
* doc/guix.texi (Log Rotation): Document it.
2022-04-04 22:58:03 +02:00
SeerLite
2e55a4c6b9
services: xorg: Remove xf86-input-synaptics from %default-xorg-modules.
Fixes <https://issues.guix.gnu.org/35450>.

This driver isn't intended to be installed by default as it takes
precedence over the recommended xf86-input-libinput.

* gnu/services/xorg.scm (%default-xorg-modules): Remove
  xf86-input-synaptics.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-03-25 18:42:14 +01:00
fesoj000
8044a1fec9
services: murmur: Fix server program name.
* gnu/services/telephony.scm (murmur-activation):
(murmur-shepherd-service): Change file name of mumble server, which is
now called mumble-server instead of murmurd since version 1.4.x.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-03-24 12:45:48 +01:00
Remco van 't Veer
e91c9edb20
services: dnsmasq: Add more options.
* gnu/services/dns.scm (<dnsmasq-configuration>): Add
forward-private-reverse-lookup?, strict-order? and cpe-id options.
(dnsmasq-shepherd-service): Pass added options to dnsmasq and use
match-record instead of match-lambda.
* doc/guix.texi (Guix Services): Document options added to dnsmasq.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-24 12:45:48 +01:00
Jelle Licht
10d865aa92
services: thermald: Add 'adaptive?' field.
* gnu/services/pm.scm (<thermald-configuration>): Add 'adaptive?' field.
(thermald-shepherd-service): Use it to pass --adaptive to thermald.
* doc/guix.texi (Power Management Services): Document the 'adaptive?' field of
'thermald-configuration'.
2022-03-20 16:40:22 +01:00
Maxim Cournoyer
2c4284d952
Revert "services: nfs: Define rpcbind-shepherd-service at the top level."
This reverts commit 0a9e82b430, which didn't end
up fixing anything.  The problem was elsewhere; namely, using
'operating-system-services' instead of 'operating-system-user-services'.
2022-03-17 16:48:21 -04:00
Maxim Cournoyer
0a9e82b430
services: nfs: Define rpcbind-shepherd-service at the top level.
Attempting to use the 'nfs-service-type' as part of a computed
operating-system definition, the following exception would be thrown:

  ice-9/boot-9.scm:1685:16: In procedure raise-exception:
  ERROR:
    1. &ambiguous-target-service-error:
        service: #<<service> type: #<service-type rpcbind 7f7529853780> value: #<<rpcbind-configuration> rpcbind: #<package rpcbind@1.2.6 gnu/packages/onc-rpc.scm:87 7f75389e78f0> warm-start?: #t>>
        target-type: #<service-type shepherd-root 7f7529396080>
    2. &message: "more than one target service of type 'shepherd-root'"

The problem was that the rpcbind shepherd-service object was dynamically
instantiated every time the rpcbind-service-type would be called, causing
multiple objects in some situations, resulting in the above condition.

* gnu/services/nfs.scm (rpcbind-service-type): Refactor and adjust in a way to
extract...
(rpcbind-shepherd-service): ... this new procedure.
2022-03-17 16:10:41 -04:00
Ludovic Courtès
5397c18157
services: openssh: Change 'authorized-keys' accessor name.
* gnu/services/ssh.scm (<openssh-configuration>)[authorized-keys]:
Rename accessor to 'openssh-configuration-authorized-keys'.
(openssh-activation, extend-openssh-authorized-keys): Adjust
accordingly.
2022-03-10 23:46:51 +01:00
Ludovic Courtès
2bac6ea177
services: secret-service: Do not generate SSH and Guix key pairs.
The justification about the order of activation snippets given in the
comment had been obsolete since
39e3b4b7ce.

Lately, running the activation snippets for "ssh-keygen -A" and "guix
archive --generate-key" would take a little bit too long, thereby
preventing the childhurd from starting on time.

* gnu/services/virtualization.scm (secret-service-operating-system):
Clear 'generate-host-keys?' and 'generate-substitute-key?'.
2022-03-10 23:46:51 +01:00
Ludovic Courtès
0691ab6779
services: openssh: Add 'generate-host-keys?' field.
* gnu/services/ssh.scm (<openssh-configuration>)[generate-host-keys?]:
New field.
(openssh-activation): Honor it.
* doc/guix.texi (Networking Services): Document it.
2022-03-10 23:46:50 +01:00
Ludovic Courtès
5e34e873af
services: guix: Add 'generate-substitute-key?' field.
* gnu/services/base.scm (<guix-configuration>)[generate-substitute-key?]:
New field.
(guix-activation): Honor it.
* doc/guix.texi (Base Services): Document it.
2022-03-10 23:46:50 +01:00
Demis Balbach
878578c0fa
services: bluetooth: Add missing config parameters.
* doc/guix.texi (Desktop Services): Document 'bluetooth-service-type'
and 'bluetooth-configuration'.
* gnu/services/desktop.scm (<bluetooth-configuration>): Add many fields.
(bluetooth-configuration-file): Handle them.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-09 23:38:18 +01:00
Cameron Chaparro
48bd8b408e
services: openvpn: Actually save log file.
* gnu/services/vpn.scm (openvpn-shepherd-service): Pass #:log-file to
'make-forkexec-constructor'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-03 23:57:01 +01:00
Maxim Cournoyer
e680c40861
services: pulseaudio: Deploy the configuration files to /etc/pulse.
* gnu/services/sound.scm (pulseaudio-environment)
[PULSE_CONFIG, PULSE_CLIENTCONFIG]: Use fixed locations, and move logic to...
(pulseaudio-etc): ... this service extension.  Guard against producing empty
files.
2022-02-26 09:03:01 -05:00
Maxim Cournoyer
60cb647a28
services: pulseaudio: Add an extra-script-files configuration field.
* gnu/services/sound.scm (<pulseaudio-configuration>)
[extra-script-files]: Add field.
(extra-script-files->file-union): New procedure.
(append-include-directive): Likewise.
(pulseaudio-etc): Use them.
* doc/guix.texi: Document the new 'extra-script-files- configuration field.
2022-02-26 09:03:01 -05:00
Maxim Cournoyer
1cc9060ca3
services/sound: Normalize pulseaudio-configuration accessor names.
* gnu/services/sound.scm (<pulseaudio-configuration>): Adjust getter names to
match convention.
2022-02-26 09:03:01 -05:00
Danny Milosavljevic
07c3a43955
agetty-shepherd-service: Rename console agetty to "term-console" for clarity.
* gnu/services/base.scm (agetty-shepherd-service)[provision]: Rename console
agetty to "term-console".
2022-02-25 17:13:55 +01:00
Danny Milosavljevic
fcb6cab621
services: %base-services: Adapt agetty-service-type to depend on syslogd
Fixes <https://issues.guix.gnu.org/30464>.

* gnu/services/base.scm (%base-services): Reorder syslog-service for clarity.
[shepherd-requirement]: New field.
2022-02-25 17:13:36 +01:00
Danny Milosavljevic
ed17082d94
services: agetty: Add shepherd-requirement.
* gnu/services/base.scm (<agetty-configuration>): Add shepherd-requirement.
* doc/guix.texi (agetty-configuration): Document it.
2022-02-25 17:13:18 +01:00
Maxim Cournoyer
e9fa17eb98
services: udev: Use a fixed location for the rules directory and config.
Fixes <https://issues.guix.gnu.org/47681>.

This change adjusts the location of the udev configuration file and rules
directory to a fixed location.  Since udev relies on inotify to discover
change to its rules directory (/etc/udev/rules.d), by using a fixed directory
layout, new udev rules can be automatically picked up without restarting the
service.

* gnu/services/base.scm (udev-rules-union): Build rules output directly
in #$output.
(udev-shepherd-service)[start]: Adjust the UDEV_CONFIG_FILE and
EUDEV_RULES_DIRECTORY environment variables.
[actions]: Remove field.  The 'rules' action is no longer useful.
(udev.conf): New variable.
(udev-etc): New procedure.
(udev-service-type): Extend the etc-service-type with it.
2022-02-20 19:58:14 -05:00
Maxim Cournoyer
6e5d219425
services: dbus: Increase auth_timeout value to 5 minutes.
This is a follow-up to 488f1c589df; the problem had re-appeared on my machine.

* gnu/services/dbus.scm (dbus-configuration-directory): Increase
'auth_timeout' value from 60000 to 300000 ms (5 minutes).
2022-02-19 01:37:42 -05:00
Ludovic Courtès
01821914e2
services: qemu-guest-agent: Fix implementation.
Previously, by accessing the raw <qemu-guest-agent-configuration>
fields, 'qemu' would match the first field, which is the '%location'
field, not the 'qemu' field.

It would seem this bug has always been present since the addition of the
'location' field in d132d9f96b predates
the addition of 'qemu-guest-agent-service-type' in
f634a0baab.

Fixes <https://issues.guix.gnu.org/54041>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

* gnu/services/virtualization.scm (qemu-guest-agent-shepherd-service):
Use accessors for <qemu-guest-agent-configuration>.
2022-02-18 14:14:39 +01:00
Maxim Cournoyer
12566aabe7
services: cuirass: Also rotate the web log.
* gnu/services/cuirass.scm (cuirass-log-rotations): Add the web log to the
list of rotated files.
2022-02-17 13:39:02 -05:00
Maxim Cournoyer
9c15252060
services: web: Rotate mumi logs.
* gnu/services/web.scm (%mumi-log, %mumi-mailer-log, %mumi-worker-log): New
variables.
(mumi-shepherd-services): Use them.
(%mumi-log-rotations): New variable.
(mumi-service-type): Extend rottlog.
2022-02-17 13:39:02 -05:00
Marius Bakke
1059c2bb66
services: zabbix: Add requirement on 'user-processes'.
This ensures the services does not start before mounts are up.
Reported by rekado on #guix.

* gnu/services/monitoring.scm (zabbix-server-shepherd-service,
zabbix-agent-shepherd-service)[requirement]: New field.
2022-02-17 18:13:16 +01:00
Marius Bakke
b38ce8489f
doc: Zabbix: Improvide description.
* doc/guix.texi (Monitoring Services): Document the various 'zabbix-*' service
types, and expand description of all Zabbix services.  Use less marketing terms.
(Web Services): Add subsubheading for PHP-FPM, and anchors for
cross-referencing.
* gnu/services/monitoring.scm (zabbix-front-end-configuration): Use @ref
instead of @pxref for cross-referencing.
2022-02-13 13:33:56 +01:00
Josselin Poiret
11b586db59
services: gdm-service-type: Require elogind.
* gnu/services/xorg.scm (gdm-shepherd-service): Make it require
elogind.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-02-10 23:17:48 +01:00
Marius Bakke
7c75fff68b
services: zabbix-frontend: Restore correct variable name.
This is a follow-up to 326e08bf0f, et.al.

* gnu/services/monitoring.scm (%zabbix-front-end-nginx-configuration): Rename
to ...
(%zabbix-front-end-configuration-nginx): ... this.
(zabbix-front-end-nginx-extension): Adjust accordingly.
2022-02-07 18:37:14 +01:00
Marius Bakke
eb2e0e3225
services: monitoring: Remove unused procedure.
This is a follow-up to commit 326e08bf0f.

* gnu/services/monitoring.scm (zabbix-front-end-nginx-configuration): Remove
variable.
2022-02-07 18:22:41 +01:00
Marius Bakke
326e08bf0f
services: zabbix-front-end: Restore backwards compatibility.
Commit e301f1a8ed removed the NGINX argument
entirely, but users may rely on and override it.  Reported by rekado on #guix.

* gnu/services/monitoring.scm (%zabbix-front-end-nginx-configuration): Restore
exported variable.
(zabbix-front-end-nginx-extension): New procedure.
(zabbix-front-end-configuration): Remove FASTCGI-PARAMS field.  Restore NGINX
field, but default to the empty list.
(zabbix-front-end-service-type): Extend NGINX-SERVICE-TYPE by
ZABBIX-FRONT-END-NGINX-EXTENSION.
* doc/guix.texi (Monitoring Services): Regenerate documentation.
2022-02-07 18:19:46 +01:00
Christopher Baines
71d2bdfa9f
services: nar-herder: Support ttl and negative-ttl options.
* gnu/services/guix.scm (<nar-herder-configuration>): Add ttl and negative-ttl
fields.
(nar-herder-shepherd-services): Pass the ttl and negative-ttl values to the
service.
* doc/guix.texi (Guix Services): Document this.
2022-02-04 10:09:01 +00:00
Christopher Baines
108e7576c0
services: patchwork: Set DEFAULT_AUTO_FIELD in settings.
This resolves some warnings with Django 3.2.

This was added by upstream to the base settings
43e5c4a0ac

* gnu/services/web.scm (patchwork-settings-module-compiler): Specify
DEFAULT_AUTO_FIELD in the settings module.
2022-02-02 18:27:10 +00:00
Attila Lendvai
67f28faf42
services: tlp: Add config variables for battery charging.
* gnu/services/pm.scm (tlp-configuration): Add start-charge-thresh-bat0,
stop-charge-thresh-bat0, start-charge-thresh-bat1, stop-charge-thresh-bat1.
* doc/guix.texi (Power Management Services): Document them.

Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
2022-02-02 10:43:04 +01:00
Maxim Cournoyer
fff4daa5c2
services/sound: Add a udev extension for the pulseaudio service type.
PulseAudio provides udev rules used to adjust the configuration of certain
hardware (e.g., sound cards); ensure they get used.

* gnu/services/sound.scm (pulseaudio-service-type): Extend the
udev-service-type with the pulseaudio package.
2022-02-01 21:48:01 -05:00
Marius Bakke
e301f1a8ed
services: zabbix-frontend: Support custom server package.
* gnu/services/monitoring.scm (%zabbix-front-end-configuration-nginx): Rename
to ...
(zabbix-front-end-nginx-configuration): ... this.  Take server package and
FastCGI parameters from ...
(zabbix-front-end-configuration): ... here.  Add PACKAGE and FASTCGI-PARAMS
fields, remove NGINX.
(zabbix-front-end-service-type): Adjust for renamed procedure.
* doc/guix.texi (Monitoring Services)[Zabbix front-end]: Regenerate documentation.
2022-02-01 23:46:05 +01:00
Christopher Baines
087cdafc9f
services: guix: Add nar-herder-service-type.
* gnu/services/guix.scm (<nar-herder-configuration>): New record type.
(nar-herder-configuration, nar-herder-configuration?,
nar-herder-configuration-package,
nar-herder-configuration-user,
nar-herder-configuration-group,
nar-herder-configuration-mirror
nar-herder-configuration-database
nar-herder-configuration-database-dump
nar-herder-configuration-host
nar-herder-configuration-port
nar-herder-configuration-storage
nar-herder-configuration-storage-limit
nar-herder-configuration-storage-nar-removal-criteria
nar-herder-shepherd-services, nar-herder-activation,
nar-herder-account): New procedures.
(nar-herder-service-type): New variable.
* gnu/tests/guix.scm (%test-nar-herder): New variable.
* doc/guix.texi (Guix Services): Document the new service.
2022-01-31 18:28:16 +00:00
Marius Bakke
ab8b76b735
services: zabbix: Support gexps in configuration serializer.
This makes it possible to do e.g. (include-files (list (local-file "foo.conf"))).

* gnu/services/monitoring.scm (serialize-field, serialize-list,
serialize-include-files, serialize-extra-options): Rewrite as gexps.
(zabbix-server-config-file, zabbix-agent-config-file): Simplify builders by
using FORMAT.
2022-01-30 14:47:43 +01:00
Marius Bakke
59847afda7
services: postgresql: Export missing <postgresql-configuration> accessor.
* gnu/services/databases.scm: Export POSTGRESQL-CONFIGURATION-EXTENSION-PACKAGES.
2022-01-29 16:09:03 +01:00
Marius Bakke
756f16aa01
services: zabbix-agent: Set the PATH variable.
* gnu/services/monitoring.scm (zabbix-agent-shepherd-service)[start]: Set the
PATH variable to the common values.
2022-01-29 12:52:38 +01:00
Marius Bakke
8fa6f975d4
services: zabbix-frontend: Adjust indentation.
* gnu/services/monitoring.scm (zabbix-front-end-activation): Reindent.
2022-01-29 12:52:37 +01:00
Marius Bakke
7f12a40e9a
services: zabbix-frontend: Enable IEEE754-compatible history values.
* gnu/services/monitoring.scm (zabbix-front-end-config): Specify
$DB['DOUBLE_IEEE754'] in the configuration file, as per current example.
2022-01-29 12:52:37 +01:00
Marius Bakke
5122805c48
services: zabbix-server: Add shepherd actions for runtime control commands.
* gnu/services/monitoring.scm (zabbix-server-runtime-control-procedure,
zabbix-server-actions): New variables.
(zabbix-server-shepherd-service)[actions]: New field.  Let-bind variables
common between actions and the start procedure.
2022-01-29 12:52:37 +01:00
Marius Bakke
4657a39270
services: zabbix-frontend: Fix configuration file for hard coded passwords.
This is a follow-up to commit 078f5bfae7.

* gnu/services/monitoring.scm (zabbix-front-end-config): When DB-PASSWORD is
set, enclose the password with quotes in the configuration file.
2022-01-29 12:52:37 +01:00