Commit graph

1689 commits

Author SHA1 Message Date
Jelle Licht 06e3f239b9
services: greetd: Fix configuration serialization.
* gnu/services/base.scm (make-greetd-terminal-configuration-file): Add missing
'general' section to configuration file.
2023-02-09 15:33:29 +01:00
Bruno Victal 8a2c2eaa90
services: lightdm: Sync documentation with source.
Table entry @item nodes cannot span multiple lines.

* gnu/services/lightdm.scm
(lightdm-gtk-greeter-configuration): Fix cursor-theme-size description.
* doc/guix.texi (lightdm-service-type): Sync with source.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-02-08 22:40:40 -05:00
Bruno Victal a5f473db6f
services: configuration: Format a list of packages by their names.
* gnu/services/configuration.scm
(generate-documentation): Format a list of packages by their names.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-02-08 22:40:39 -05:00
Bruno Victal b0e18601db
services: Add block-facebook-hosts-service-type.
Deprecates %facebook-host-aliases in favour of using
hosts-service-type service extensions.

* gnu/services/networking.scm
(block-facebook-hosts-service-type): New variable.
(%facebook-host-aliases): Deprecate variable.
* doc/guix.texi: Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-02-09 01:07:54 +01:00
Bruno Victal 22dd558c70
services: Add hosts-service-type.
* gnu/services/base.scm (<host>): New record type.
(host): New procedure.
(hosts-service-type): New variable.
* doc/guix.texi (Service Reference): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-02-09 01:07:39 +01:00
Maxim Cournoyer aef75942fc
gnu: libjami: Move jamid daemon to a "bin" output.
* gnu/packages/jami.scm (libjami) [outputs]: Add a "bin" output.
[arguments]: Add a move-jamid phase.
* gnu/services/telephony.scm
(jami-configuration->command-line-arguments): Refer to the "bin" output of
libjami.
(jami-shepherd-services): Likewise.
2023-02-08 09:36:26 -05:00
Bruno Victal 4b9e1e8458
services: mpd: Fix serialization procedure for list-of-string.
This is a followup to commit 5c5f0fc113

* gnu/services/audio.scm (mpd-serialize-list-of-string): Fix serialization procedure.

Signed-off-by: Leo Famulari <leo@famulari.name>
2023-02-05 18:25:10 +01:00
Bruno Victal 139c9a53cb
services: Add mympd-service-type.
* gnu/services/audio.scm (mympd-service-type): New variable.
* gnu/tests/audio.scm (%test-mympd): New variable.
* doc/guix.texi: Document it.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-02-05 06:56:44 +01:00
Bruno Victal 637a9c3b26
services: mpd: Do not hardcode environment variables.
Services should not expect for XDG_RUNTIME_DIR to be set.
Inferring from the past comment, this seemed to resolve an issue when
the service was launched with an _interactive_ user-account,
which tends to have this variable set by the login-manager.

This is not the case for system accounts and setting this variable
results in PulseAudio (launched by the same system user) failing to start
since it attempts to use a nonexistent directory.

Ideally, this service should have a home-service counterpart but the old
behavior can be emulated by setting the environment-variables field to:

(environment-variables
  (list
    (string-append "XDG_RUNTIME_DIR=/run/user/"
                   (number->string (passwd:uid (getpwnam "myuser"))))))

* gnu/services/audio.scm
(mpd-configuration)[environment-variables]: New field.
(mpd-shepherd-service)[start]: Use new field.
* doc/guix.texi (Audio Services)[Music Player Daemon]: Document it.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-02-05 06:56:43 +01:00
Bruno Victal 5c5f0fc113
services: mpd: Refactor MPD service.
Refactor mpd-service-type to support additional mpd.conf directives
and move activation-service-extension into service constructor.

* gnu/services/audio.scm (mpd-plugin, mpd-partition): New records.

(mpd-serialize-boolean): Alias to and integrate logic into...
(mpd-serialize-field): ... this.
(mpd-serialize-list-of-string): New variable.

(mpd-plugin?, mpd-partition?, list-of-string?, list-of-symbol?)
(list-of-mpd-plugin?, list-of-mpd-partition?)
(list-of-mpd-plugin-or-output?, port?): New variables.

(mpd-file-name, mpd-service-activation): Remove variables.

(mpd-configuration)
[package, group, shepherd-requirement, log-file, log-level, music-directory]
[playlist-directory, endpoints, database, partitions, neighbors, inputs]
[archive-plugins, input-cache-size, decoders, resampler, filters]
[playlist-plugins, extra-options]: New fields.
[music-dir, playlist-dir, address]: Deprecate shorthand fields.
[db-file, state-file, sticker-file, port, outputs]: Change admissible type.

(mpd-shepherd-service)
[actions]: New shepherd actions: 'reopen' and 'configuration'.
[requirement]: Splice with 'shepherd-requirement' field.
[start]: Use 'package' field. Remove #:log-file parameter.
Move activation-service extension into constructor.

(mpd-accounts): Honor user and group names from configuration.
(mpd-log-rotation): New procedure.
(mpd-service-type)[extensions]: Add rottlog-service-type extension.
Remove activation-service-type extension.

(mpd-output-name, mpd-output-type, mpd-output-enabled?, mpd-output-format)
(mpd-output-tags?, mpd-output-always-on?, mpd-output-mixer-type)
(mpd-output-replay-gain-handler, mpd-output-extra-options)
(mpd-plugin-plugin, mpd-plugin-name, mpd-plugin-enabled?)
(mpd-plugin-extra-options)
(mpd-partition-name, mpd-partition-extra-options)
(mpd-configuration-package, mpd-configuration-user)
(mpd-configuration-group, mpd-configuration-shepherd-requirement)
(mpd-configuration-log-file, mpd-configuration-log-level)
(mpd-configuration-music-directory, mpd-configuration-music-dir)
(mpd-configuration-playlist-directory, mpd-configuration-playlist-dir)
(mpd-configuration-db-file, mpd-configuration-state-file)
(mpd-configuration-sticker-file, mpd-configuration-default-port)
(mpd-configuration-endpoints, mpd-configuration-address)
(mpd-configuration-database, mpd-configuration-partitions)
(mpd-configuration-neighbors, mpd-configuration-inputs)
(mpd-configuration-archive-plugins, mpd-configuration-input-cache-size)
(mpd-configuration-decoders, mpd-configuration-resampler)
(mpd-configuration-filters, mpd-configuration-outputs)
(mpd-configuration-playlist-plugins, mpd-configuration-extra-options): Export accessors.

* doc/guix.texi (Audio Services)[Music Player Daemon]: Update documentation.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-02-05 06:56:43 +01:00
Bruno Victal d7fd9ec209
services: mpd: Rewrite using 'define-configuration'.
* gnu/services/audio.scm
(mpd-configuration, mpd-output): Rewrite using define-configuration.
(uglify-field-name, mpd-serialize-field, mpd-serialize-alist)
(mpd-serialize-number, mpd-serialize-boolean, mpd-serialize-list-of-mpd-output)
(mpd-serialize-configuration): New procedure.
(list-of-mpd-output?): New predicate.
(mpd-config->file, mpd-output->string): Remove procedure.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-02-05 06:56:43 +01:00
Christopher Baines 9a5533c653
services: nar-herder: Add cached compression support.
* gnu/services/guix.scm (<nar-herder-cached-compression-configuration>): New
record type.
(nar-herder-configuration-cached-compressions,
nar-herder-configuration-cached-compression-min-uses,
nar-herder-configuration-cached-compression-workers,
nar-herder-configuration-cached-compression-nar-source,
nar-herder-cached-compression-configuration,
nar-herder-cached-compression-configuration?,
nar-herder-cached-compression-configuration-type,
nar-herder-cached-compression-configuration-level,
nar-herder-cached-compression-configuration-directory,
nar-herder-cached-compression-configuration-directory-max-size): New
procedures.
* doc/guix.texi (Guix Services): Document this.
2023-02-03 15:18:44 +01:00
Ludovic Courtès 6ffeef92e6
services: hpcguix-web: Provide default values.
* gnu/services/web.scm (<hpcguix-web-configuration>)[specs]: Default to #f.
(hpcguix-web-shepherd-service): Do not pass '--config' when SPECS is #f.
(hpcguix-web-service-type)[default-value]: New field.
* doc/guix.texi (Web Services): Adjust accordingly.
2023-01-22 18:12:09 +01:00
Declan Tsien 0f20fc4dd9
services: connman: Add iwd backend support.
* gnu/services/networking.scm (connman-configuration)[iwd?]: New field.
(connman-shepherd-service): Add iwd? logic, remove wpa-supplicant requirement.
* doc/guix.texi: Add information about connman-configuration iwd? option.

Co-authored-by: Andrew Tropin <andrew@trop.in>
Signed-off-by: Andrew Tropin <andrew@trop.in>
2023-01-16 20:59:30 +04:00
Zhu Zihao daa471a738
gnu: services: Export polkit-configuration.
Export for user customization.

* gnu/services/dbus.scm (polkit-configuration): Export.
(polkit-configuration?): Export.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-01-16 15:08:22 +08:00
Jelle Licht a5b914156e
services: greetd: Add 'source-profile?' configuration field.
* gnu/services/base.scm (<greetd-terminal-configuration>)[source-profile?]:
New field.
(make-greetd-terminal-configuration-file): Serialize new field to
configuration file.
* doc/guix.texi (Base Services): Document it.
2023-01-15 20:30:12 +01:00
David Thompson 202ac747e6
gnu: services: Add joycond-service.
* gnu/services/games.scm (joycond-configuration): New configuration type.
(joycond-shepherd-service): New procedure.
(joycond-service-type): New variable.
* doc/guix.texi (Game Services): Document it.
2023-01-14 07:53:21 -05:00
muradm dc403ec7f1
gnu: services: Fix fail2ban configuration serialization.
This fixes a regression from 543d971ed2 whereby
match-lambda due to configuration field reordering.

* gnu/services/security.scm:
[serialize-fail2ban-ignore-cache-configuration]: Switch to match-record.
[serialize-fail2ban-jail-filter-configuration]: Switch to match-record.
[serialize-fail2ban-jail-action-configuration]: Switch to match-record.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-01-10 10:47:27 -05:00
Giacomo Leidi 5f63811032
services: unattended-upgrade: Add 'operating-system-expression' field.
* gnu/services/admin.scm (<unattended-upgrade-configuration>)
[operating-system-expression]: New field.
(unattended-upgrade-mcron-jobs): Honor it.
* doc/guix.texi (Unattended Upgrades): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-01-10 11:49:14 +01:00
Bruno Victal 22e9b01bda
services: git-daemon: Deprecate 'git-daemon-service' procedure.
* gnu/services/version-control.scm
(git-daemon-service): Define with 'define-deprecated'
* doc/guix.texi (Version Control Services): Replace with
'git-daemon-service-type'

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-01-10 11:49:13 +01:00
Mathieu Othacehe 8b314efd50
services: base: Add environment support to guix-configuration.
* gnu/services/base.scm (<guix-configuration>)[extra-env]: New field.
(guix-shepherd-service): Honor it.
* doc/guix.texi (Base Services): Document it.
2023-01-09 17:15:28 +01:00
Mathieu Othacehe 699d104146
Revert "services: base: Add extra-env support to guix-configuration."
This reverts commit 78a9b4f996. It was pushed by
error, while not reviewed yet.
2023-01-07 20:14:24 +01:00
Mathieu Othacehe 78a9b4f996
services: base: Add extra-env support to guix-configuration.
* gnu/services/base.scm (<guix-configuration>)[extra-env]: New field.
(guix-shepherd-service): Honor it.
* doc/guix.texi (Base Services): Document it.
2023-01-07 19:41:51 +01:00
jgart c13c890138
services: certbot: Fix broken link.
* gnu/services/certbot.scm (certbot-renewal-jobs): Fix broken link.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-01-03 16:34:44 -05:00
Efraim Flashner ff092b9454
services: enlightenment: Load ddcutil udev rules.
* gnu/services/desktop.scm (enlightenment-desktop-service-type): Extend
the enlightenment-desktop-service-type with the udev rules from the
ddcutil input in the udev-service-type.
2022-12-30 15:17:44 +02:00
Maxim Cournoyer 4ca649e978
services: pulseaudio: Fix /etc/pulse/default.pa not being used.
Fixes <https://issues.guix.gnu.org/60383>.

* gnu/services/sound.scm (pulseaudio-etc): Produce daemon.conf
unconditionally, with the correct default-script-file location.  Produce
client.conf unconditionally.

Reported-by: Bruno Victal <mirai@makinata.eu>
2022-12-28 16:58:03 -05:00
Ivan Vilata i Balaguer 9369c1ccf4
gnu: services: Fix bluetooth-service docstring.
* gnu/services/desktop.scm (bluetooth-service): Sync docstring with info,
remove mention to group not really needed to access D-Bus service.
* doc/guix.texi (Desktop Services): Also remove mention to group here.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-26 00:48:05 +01:00
Timo Wilken 2967abf1a2
services: wireguard: Allow specifying pre-shared keys.
* gnu/services/vpn.scm (<wireguard-peer>)[preshared-key]: New field.
* doc/guix.texi (VPN Services): Document it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-12-25 16:56:48 +01:00
Marius Bakke c97de4a989
services: ganeti: Label mcron jobs.
* gnu/services/ganeti.scm (ganeti-watcher-jobs): Label job as "ganeti-watcher".
(ganeti-cleaner-jobs): Labels jobs as "ganeti master cleaner" and "ganeti node
cleaner".
2022-12-25 14:15:59 +01:00
Bruno Victal 00f48860e9
services: opensmtpd: Add 'shepherd-requirement' field.
* gnu/services/mail.scm (<opensmtpd-configuration>)[shepherd-requirement]:
New field.
(opensmtpd-shepherd-service): Honor it.
* doc/guix.texi (Mail Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-20 16:56:04 +01:00
Bruno Victal 3011e8ae11
services: opensmtpd: Use 'match-record' instead of 'match'.
* gnu/services/mail.scm (opensmtpd-shepherd-service)
(opensmtpd-activation)
(opensmtpd-set-gids): Use 'match-record' instead of 'match'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-20 16:56:03 +01:00
Florian Pelz bbd11199e6
services:·kmscon:·Display·CJK·characters.
Follow-up·to d7d049fdcd.

* gnu/services/base.scm·(kmscon-service-type):·Use·GNU·Unifont,
which bundles CJK glyphs from WenQuanYi and elsewhere.
2022-12-20 11:11:23 +01:00
Ludovic Courtès 12ca767702
Merge branch 'version-1.4.0' 2022-12-19 00:40:33 +01:00
Ludovic Courtès d7d049fdcd
services: kmsconf: Load GNU Freefont.
This provides glyphs for additional fonts such as Amharic that were
otherwise missing.

Fixes <https://issues.guix.gnu.org/60164>.
Reported by Wolf <wolf@wolfsden.cz>.

* gnu/services/base.scm (kmscon-service-type): In 'start' method,
pass #:environment-variables to set 'XDG_DATA_DIRS'.
2022-12-18 13:08:04 +01:00
Marius Bakke 88908c6edc
services: ganeti: Add support for cluster hooks.
* gnu/services/ganeti.scm (<ganeti-configuration>): Add HOOKS.
(hooks->directory): Rename to ...
(debootstrap-hooks->directory): ... this, for clarity.
(debootstrap-configuration-compiler): Adjust accordingly.
(ganeti-directory): Add HOOKS when set.
(ganeti-etc-service): Pass HOOKS.
* doc/guix.texi (Virtualization Services): Mention it.
2022-12-17 17:08:50 +01:00
Christopher Baines f4dc53881b
services: nix: Fix nix-shepherd-service.
* gnu/services/nix.scm (nix-shepherd-service): Un-gexp build-directory.
2022-12-15 10:13:24 +00:00
Ricardo Wurmus 82c511dd54
gnu: slapd-configuration: Update default for run-dir.
* gnu/services/ldap.scm (slapd-configuration): Update default value for
run-dir to match defaults of 389-ds-base package.
* doc/guix.texi: Update documentation.
2022-12-14 22:56:00 +01:00
Ricardo Wurmus c6f81ff7a6
gnu: Add directory-server-service-type.
* gnu/services/ldap.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (LDAP Services): Document it.
2022-12-14 20:55:04 +01:00
Bruno Victal a312bc9cd8
services: configuration: Remove orphan reference to example.
'generic-serialize-alist' refers to (gnu home services version-control)
for usage examples but there's no such module.

* gnu/services/configuration.scm (generic-serialize-alist): Adjust
docstring.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-14 12:44:02 +01:00
Petr Hodina 22acc0b029
services: nix: Add more configuration fields.
* gnu/services/nix.scm (<nix-configuration>)[build-directory]: New field.
(nix-service-etc, nix-shepherd-service): Take them into account.
* doc/guix.texi (Nix): Update it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-13 17:46:39 +01:00
Christopher Baines d5ad3dd59a
services: guix-build-coordinator: Fix service startup.
Previously the service would keep starting more and more processes.

* gnu/services/guix.scm (guix-build-coordinator-shepherd-services): Fix how
make-forkexec-constructor is called.
2022-12-12 19:58:25 +00:00
Marius Bakke 16f87d883b
services: zabbix-server: Increase Shepherd grace period.
* gnu/services/monitoring.scm (zabbix-server-shepherd-service)[stop]: Add
 #:grace-period.
2022-12-12 15:12:58 +01:00
Ludovic Courtès 302a84a593
Merge branch 'version-1.4.0' 2022-12-12 15:03:35 +01:00
Ludovic Courtès 556520a33c
services: nscd: Use nscd from 'glibc-final' on native builds.
This reduces the closure size of systems by removing one glibc
copy--namely (@ (gnu packages base) glibc) in addition to (@ (gnu
packages commencement) glibc-final).

* gnu/services/base.scm (<nscd-configuration>)[glibc]: Change default
value to use 'let-system' and 'canonical-package' as appropriate.
2022-12-09 16:43:25 +01:00
Ludovic Courtès 156a881001
services: base: Use 'match-record' instead of 'match'.
* gnu/services/base.scm (agetty-shepherd-service)
(mingetty-shepherd-service)
(nscd.conf-file)
(udev-shepherd-service)
(udev-etc)
(gpm-shepherd-service)
(network-set-up/linux)
(network-tear-down/linux)
(static-networking-shepherd-service)
(greetd-agreety-tty-session-command)
(greetd-agreety-tty-xdg-session-command): Use 'match-record' instead of
'match'.
(guix-accounts): Use <guix-configuration> accessors.
(udev-service-type): Use <udev-configuration> accessors.
2022-12-08 13:21:53 +01:00
Ludovic Courtès 754a7660a1
records: 'match-record' checks fields at macro-expansion time.
This allows 'match-record' to be more efficient (field offsets are
computed at compilation time) and to report unknown fields at
macro-expansion time.

* guix/records.scm (map-fields): New macro.
(define-record-type*)[rtd-identifier]: New procedure.
Define TYPE as a macro and use a separate identifier for the RTD.
(lookup-field, match-record-inner): New macros.
(match-record): Rewrite in terms of 'match-error-inner'.
* tests/records.scm ("match-record, simple")
("match-record, unknown field"): New tests.
* gnu/services/cuirass.scm (cuirass-shepherd-service): Rename 'log-file'
local variable to 'main-log-file'.
* gnu/services/getmail.scm (serialize-getmail-configuration-file): Move
after <getmail-configuration-file> definition.
2022-12-08 13:21:23 +01:00
Ludovic Courtès a420b4f34e
services: fail2ban: Start server in the foreground.
Previously, we were passing '-b', thereby starting the server in the
background.  Consequently the 'start' method could complete before the
server was ready to accept connections on its socket, leading to
non-deterministic test failures.

Reported by Mathieu Othacehe <othacehe@gnu.org>.

* gnu/services/security.scm (fail2ban-shepherd-service): Change
FAIL2BAN-ACTION to invoke 'fail2ban-client'.
Change 'start' method to use 'make-forkexec-constructor'; start the
server in the foreground with '-f' and pass '-x' to force execution of
the server, as done upstream in 'fail2ban.service.in'.
2022-12-06 17:49:50 +01:00
Ludovic Courtès a508b5c778
services: fail2ban: Remove unnecessary Shepherd 'modules' field.
* gnu/services/security.scm (fail2ban-shepherd-service): Remove
unnecessary 'modules' field.
2022-12-06 17:07:46 +01:00
Ludovic Courtès e45c83c397
services: fail2ban: 'stop' returns #f when the dameon is stopped.
* gnu/services/security.scm (fail2ban-shepherd-service): Change
FAIL2BAN-ACTION to return an 'invoke' gexp.
Adjust the shepherd 'start' and 'stop' fields accordingly.  Have 'stop'
return #f on success.
2022-12-06 17:07:12 +01:00
Maxim Cournoyer 41407fda7a
services: configuration: Rename location accessor to "source-location".
Fixes <https://issues.guix.gnu.org/59423>.

* gnu/services/configuration.scm (define-configuration-helper): Rename the
accessor of the %location field from "NAME-location" to
"NAME-source-location".

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reported-by: Pierre Langlois <pierre.langlois@gmx.com>
2022-12-04 21:47:19 +01:00