3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
Commit graph

1660 commits

Author SHA1 Message Date
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
EuAndreh
8d6feb4b10
services: wireguard: Use the parameterized wireguard package.
* gnu/services/vpn.scm (wireguard-activation): Use the "wg" binary from
the package given to <wireguard-configuration>.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2022-12-09 10:53:50 +08:00
Bruno Victal
9336baf258
services: configuration: Rewrite 'alist?' procedure.
* gnu/services/configuration.scm (alist?): Rewrite.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-12-08 13:07:46 +01:00
Ludovic Courtès
9ccc94afb2
services: guix-publish: Keep fewer rotated logs.
* gnu/services/base.scm (%guix-publish-log-rotations): Add 'options'
field.
2022-12-07 23:36:20 +01:00
Ludovic Courtès
ac682963a3
service: cuirass: Rotate remote server logs.
* gnu/services/cuirass.scm (cuirass-log-rotations): Add the remote
server log when it is used.
2022-12-07 23:36:20 +01:00
Ludovic Courtès
ce1f5ff6cf
services: cuirass-remote-worker: Rotate logs.
* gnu/services/cuirass.scm (cuirass-remote-worker-log-rotations): New
procedure.
(cuirass-remote-worker-service-type): Use it.
2022-12-07 23:36:19 +01:00
Marius Bakke
40153fe033
services: zabbix-agent: Adjust command-line when using zabbix_agent2.
* gnu/services/monitoring.scm (zabbix-agent-arguments): New procedure.
(zabbix-agent-shepherd-service): Use that to determine command line arguments.
2022-12-07 20:08:36 +01:00
Marius Bakke
10251c4456
services: zabbix: Don't write user to configuration file.
The service already runs with the specified user and group, so there is no use
in writing it to the configuration files.  This change is mainly done for
compatibility with 'zabbix-agent2' which does not understand the User=
setting, but also to document the correct data type for the "group" setting.

* gnu/services/monitoring.scm (serialize-string): Filter USER and GROUP
fields.
(group?, serialize-group): Remove variables.
(zabbix-server-configuration, zabbix-agent-configuration): Document the GROUP
field as 'string'.
* doc/guix.texi (Monitoring Services): Adjust accordingly.
2022-12-07 20:08:36 +01:00
Maxim Cournoyer
b75559179e
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-02 22:02:48 -05:00
Ludovic Courtès
00ddf185e6
services: networking: Avoid 'match' on records.
* gnu/services/networking.scm (dhcp-client-shepherd-service): Use
accessors instead of 'match'.
(inetd-shepherd-service): Likewise.
(tor-shepherd-service): Likewise.
(network-manager-service-type): Likewise.
(modem-manager-service-type): Likewise.
(wpa-supplicant-service-type): Likewise.
(openvswitch-activation): Likewise.
(openvswitch-shepherd-service): Likewise.
(dhcpd-shepherd-service): Use 'match-record' instead of 'match'.
(dhcpd-activation): Likewise.
(ntp-server->string): Likewise.
(ntp-shepherd-service): Likewise.
(tor-configuration->torrc): Likewise.
(network-manager-activation): Likewise.
(network-manager-environment): Likewise.
(network-manager-shepherd-service): Likewise.
(usb-modeswitch-configuration->udev-rules): Likewise.
(wpa-supplicant-shepherd-service): Likewise.
(iptables-shepherd-service): Likewise.
(nftables-shepherd-service): Likewise.
(keepalived-shepherd-service): Likewise.
2022-12-02 00:03:40 +01:00
Ludovic Courtès
adfe1064c8
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-02 00:02:13 +01:00
Ludovic Courtès
7c1161dba4
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-02 00:02:12 +01:00
Andrew Tropin
0823fd1aa9
services: network-manager: Add iwd backend support.
* gnu/services/networking.scm (network-manager-configuration)[iwd?]: New
field.
(network-manager-shepherd-service): Add iwd to requirements if needed.
* doc/guix.texi: Add information about iwd? option.
2022-12-01 18:56:24 +04:00
Marius Bakke
351bada950
services: mysql: Run mariadb-install-db instead of hard coding schemas.
* gnu/services/databases.scm (mysql-install): Run "mariadb-install-db" instead
of a hard coded set of SQL commands.
(mysql-upgrade-wrapper): Explicitly run as mysql user.
2022-11-20 17:54:05 +01:00
Marius Bakke
3323ffa66d
services: mysql: Remove mysql-install-service in favor of wrapper.
* gnu/services/databases.scm (mysql-with-install-lock): Remove variable.
(mysql-start): Rename to ...
(mysqld-wrapper): ... this.  Do the preliminary initialization steps and call
out to MYSQL-INSTALL when necessary.
(mysql-install): Only initialize table schemas.
(mysql-install-shepherd-service): Remove.
(mysql-service)[requirement]: Remove 'mysql-install.  Add 'user-processes.
[start]: Don't pass #:user and #:group.
(mysql-shepherd-services): Remove MYSQL-INSTALL-SHEPHERD-SERVICE.
2022-11-20 17:54:05 +01:00
Marius Bakke
e4a74f38df
services: mysql-upgrade: Add log file.
* gnu/services/databases.scm (mysql-upgrade-shepherd-service)[start]: Pass
 #:log-file.
2022-11-20 17:54:05 +01:00
Marius Bakke
6ac97bb503
services: mysql-upgrade: Support custom datadir.
* gnu/services/databases.scm (mysql-upgrade-wrapper): Take service
configuration as argument, and pass the config file to mysql_upgrade.
(mysql-upgrade-shepherd-service): Pass CONFIG instead of just socket and
executable to MYSQL-UPGRADE-WRAPPER.
2022-11-20 17:54:05 +01:00
Ellen Papsch
c7b266fdf2
gnu: mysql: Support custom data dir.
* gnu/services/databases.scm (mysql-configuration): Add datadir property.
* gnu/services/databases.scm (mysql-configuration-file): Replace hard coded
data dir with property from config.
* gnu/services/databases.scm (%mysql-activation): Remove activation, it runs
before PID 1. The data dir may reside on a file system not mounted at this
time.
* gnu/services/databases.scm (mysql-install-shepherd-service): Create service
which replaces the activation. Provide mysql-install.
* gnu/services/databases.scm (mysql-shepherd-service): Move invocation of
mysqld to mysql-start program-file, because the invocation gotten more
complex. Require mysql-install.
* gnu/services/databases.scm (mysql-start): Invoke mysqld only if a lock file
appears.
* gnu/services/databases.scm (mysql-shepherd-services): Prepend the install
service before the normal service.
* gnu/services/databases.scm (mysql-upgrade-wrapper): Increase timeout to
  20s to let the mysql install procedure finish.

Signed-off-by: Marius Bakke <marius@gnu.org>
2022-11-20 17:54:04 +01:00
Leo Nikkilä
d072bcebbf
gnu: Fix copyright line.
This is a follow-up to commit 9ad311ec15.

* gnu/packages/virtualization.scm: Remove copyright line.
* gnu/services/virtualization.scm: Add copyright line.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-20 12:00:04 +00:00
Christopher Baines
dafab37110
services: guix-build-coordinator: Remove duplicate log timestamp.
* gnu/services/guix.scm (guix-build-coordinator-shepherd-services,
guix-build-coordinator-agent-shepherd-services,
guix-build-coordinator-queue-builds-shepherd-services): Set
%current-logfile-date-format to "".

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-20 12:00:04 +00:00
Ludovic Courtès
50c17ddd9e
services: lightdm: Do not use GOOPS.
There's an unwritten policy to not use GOOPS in Guix.

* gnu/services/lightdm.scm (strip-class-name-brackets): Rename to...
(strip-record-type-name-brackets): ... this.
(config->name): Adjust accordingly and use 'record-type-name' instead of
'class-name'.
(list-of-greeter-configurations?): Likewise.
2022-11-19 19:54:14 +01:00
Ludovic Courtès
2a358911b0
services: tor: Remove unnecessary modules from shepherd environment.
This is a followup to fb868cd779.

* gnu/services/networking.scm (tor-shepherd-service): Remove unused
'with-imported-modules' and 'modules' field.
2022-11-18 15:44:40 +01:00
Ludovic Courtès
8d9647d8a7
services: Add Shepherd 'configuration' action to various services.
* gnu/services/avahi.scm (avahi-shepherd-service): Add 'actions' field.
* gnu/services/base.scm (nscd-actions): Add call to
'shepherd-configuration-action'.
* gnu/services/desktop.scm (upower-shepherd-service): Add 'actions'
field.
(elogind-shepherd-service): Likewise.
* gnu/services/dict.scm (dicod-shepherd-service): Likewise.
* gnu/services/networking.scm (openntpd-shepherd-service): Likewise.
(tor-shepherd-service): Likewise.
* gnu/services/ssh.scm (openssh-shepherd-service): Likewise.
* gnu/services/web.scm (nginx-shepherd-service): Likewise.
* gnu/services/xorg.scm (gdm-shepherd-service): Likewise.
* gnu/tests/base.scm (run-basic-test)["nscd configuration action"]: New
test.
* doc/guix.texi (Services): Document it.
2022-11-18 15:44:39 +01:00
Ludovic Courtès
ebc7de6a1e
services: shepherd: Define 'shepherd-configuration-action' helper.
* gnu/services/shepherd.scm (shepherd-configuration-action): New
* doc/guix.texi (Shepherd Services): Document it.
2022-11-18 15:44:39 +01:00
Ludovic Courtès
83c9e00ffb
services: getmail: Use 'match-record'.
Fixes a regression introduced in
44554e7133 whereby the wrong record fields
would be accessed, leading to a <location> record being spliced in the
result.

* gnu/services/getmail.scm (serialize-getmail-configuration-file): Use
'match-record' instead of 'match'.
(getmail-shepherd-services): Likewise.
2022-11-17 23:03:50 +01:00
EuAndreh
35ef5fca0a
services: gitolite: Use the correct variable for the user-group.
The default value for <gitolite-configuration> has "git" for both the values
of the user and the group, as costumary, which means that unless someone uses
a custom configuration and chooses different strings for user and group, this
wouldn't show up.

* gnu/services/version-control.scm (gitolite-accounts): Use the correct
variable for the name of a (user-group ...).

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-17 12:00:32 +00:00
Maxim Cournoyer
7ae4cfa5aa
services: Streamline or eliminate some match-lambda patterns.
These were spot while working on a fix for commit 543d971ed2 ("services:
configuration: Re-order generated record fields").

* gnu/services/web.scm (php-fpm-accounts): Remove extraneous trailing dummy
catchall patterns.
(agate-accounts): Access the configuration fields directly since there are
only two, which is less error-prone.
2022-11-17 06:49:51 -05:00
Maxim Cournoyer
238248aac9
Fix problems initially introduced in commit 543d971ed2, now reinstated.
Commit 543d971ed2 ("services: configuration: Re-order generated record
fields") introduced two regressions, one in guix home and another one in the
zabbix service.

* gnu/home/services/shells.scm (home-bash-extensions): Remove the first
pattern in the match, which used to be to ignore %location.
* gnu/services/monitoring.scm (zabbix-front-end-nginx-extension): Likewise.
2022-11-17 06:49:51 -05:00
Maxim Cournoyer
44554e7133
Revert "services: configuration: Revert to a working ‘guix home’."
This reverts commit 39e4e00f75, with fixes for
the guix home issues reported and another one found while reconfiguring berlin
in the subsequent commit.
2022-11-17 06:49:51 -05:00
Tobias Geerinckx-Rice
39e4e00f75
services: configuration: Revert to a working ‘guix home’.
This reverts commit 543d971ed2, and
its dependent commit 9b21cd2e9a, which
appear to have triggered a recent wave of ‘guix home’ regressions
involving (services (list (service home-bash-service-type))):

In gnu/home/services/shells.scm:
    504:7  3 (home-bash-extensions #<<home-bash-configuration> package: #<package bash@5.1.8 gnu/packages/ba…> …)
In unknown file:
           2 (append #<<location> file: "…" line: 14 column: 12> ())
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure append: Wrong type argument in position 1 (expecting empty list): #<<location> file: "…" line: 14 column: 12>

I should love to dive in & fix this rather than revert, but urgently
need sleep.
2022-11-13 01:00:00 +01:00