Commit graph

2087 commits

Author SHA1 Message Date
Maxim Cournoyer
d43d8377c7
services: rsync: Use least authority wrapper.
* gnu/services/rsync.scm (rsync-shepherd-service) Wrap rsync command in a
least-authority-wrapper.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-05-18 23:11:19 -04:00
Maxim Cournoyer
03e601da49
services: rsync: Use make-inetd-constructor.
* gnu/services/rsync.scm (rsync-shepherd-service): Use make-inetd-constructor
if available in start slot.
* gnu/tests/rsync.scm (run-rsync-test): Delete "PID file" test.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-05-18 23:10:56 -04:00
Maxim Cournoyer
5b700945fb
services: ssh: Really rename openssh-challenge-response-authentication?
Fixes up 9c161c1f0d, which renamed the accessor of <openssh-configuration> but
failed to adjust the single usage.

* gnu/services/ssh.scm (openssh-config-file): Rename
openssh-challenge-response-authentication? call to
openssh-configuration-challenge-response-authentication?.
2023-05-17 22:26:41 -04:00
Maxim Cournoyer
9c161c1f0d
services: ssh: Rename openssh-challenge-response-authentication?
This is a follow-up commit to the preceding commit, which exported all
<openssh-configuration> accessors.

* gnu/services/ssh.scm (<openssh-configuration>): Rename
openssh-challenge-response-authentication? to
openssh-configuration-challenge-response-authentication?.  It's a mouthful,
but is at least consistent with the rest.
2023-05-17 21:45:08 -04:00
Maxim Cournoyer
760fadec15
services: openssh: Export openssh-configuration accessors.
* gnu/services/ssh.scm: Export openssh-configuration accessors.
2023-05-17 21:37:03 -04:00
Ludovic Courtès
134c10241a
services: shepherd: Default to 0.10.
* gnu/services/shepherd.scm (<shepherd-configuration>)[shepherd]:
Default to SHEPHERD-0.10.
* gnu/home/services/shepherd.scm (<home-shepherd-configuration>)[shepherd]:
Likewise.
2023-05-13 16:27:55 +02:00
Christopher Baines
9a6bbea9d4
services: nar-herder: Support extra environment vars.
* gnu/services/guix.scm (nar-herder-configuration-extra-environment-variables):
New procedure.
(nar-herder-shepherd-services): Pass the environment variables to the
shepherd.
* doc/guix.texi (Guix Services): Document it.
2023-05-13 11:26:37 +01:00
Bruno Victal
ca52cdd647
services: inetd: Export accessors.
* gnu/services/networking.scm: Export inetd-configuration?,
inetd-configuration-program, inetd-configuration-entries, inetd-entry?,
inetd-entry-node, inetd-entry-name, inetd-entry-socket-type,
inetd-entry-protocol, inetd-entry-wait?, inetd-entry-user, inetd-entry-program
and inetd-entry-arguments.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-05-11 16:38:29 +02:00
Bruno Victal
0e3bb48d36
services: Add vnstat-service-type.
* gnu/services/monitoring.scm (vnstat-service-type): New variable.
* doc/guix.texi (Monitoring Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-05-11 16:38:29 +02:00
Sergey Trofimov
61031dd32f
services: dhcp-client-configuration: Add 'shepherd-requirement' field.
* gnu/services/networking.scm (<dhcp-client-configuration>)
[shepherd-requirement]: New field.
(dhcp-client-shepherd-service): Honor it.
(dhcp-client-configuration-shepherd-requirement): Export accessor.
* doc/guix.texi (Networking Setup): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-05-11 16:38:28 +02:00
Josselin Poiret
c970edad23
services: elogind: Add elogind as a shepherd PAM requirement.
* gnu/services/desktop.scm (pam-extension-procedure): Add the elogind shepherd
requirement to the PAM extension.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-05-11 13:21:45 +02:00
Josselin Poiret
2df5d4fd18
system: pam: Let PAM extensions add shepherd requirements.
* gnu/system/pam.scm (<pam-extension>): New record type.
(pam-shepherd-service): Add Shepherd synchronization point.

* gnu/services/mail.scm (dovecot-shepherd-service)
* gnu/services/lightdm.scm (lightdm-shepherd-service)
* gnu/services/mail.scm (opensmtpd-shepherd-service)
* gnu/services/sddm.scm (sddm-shepherd-service)
* gnu/services/ssh.scm (lsh-shepherd-service, openssh-shepherd-service)
* gnu/services/xorg.scm (slim-shepherd-service, gdm-shepherd-service)
* gnu/services/base.scm (greetd-shepherd-services): Add PAM requirement.

* gnu/system/pam.scm (/etc-entry, extend-configuration,
pam-root-service-type, pam-root-service)
* gnu/services/authentication.scm (pam-ldap-pam-service)
* gnu/services/base.scm (pam-limits-service-type)
(greetd-pam-service)
* gnu/services/desktop.scm (pam-gnome-keyring)
* gnu/services/kerberos.scm (pam-krb5-pam-service)
* gnu/services/pam-mount.scm (pam-mount-pam-service): Adapt to use
pam-extension.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-05-11 13:21:45 +02:00
Ludovic Courtès
695042ff10
services: syslog: Do not call 'umask' in PID 1.
Fixes a race condition when starting services in parallel with shepherd
0.10.x whereby a service might create files and directories with umask #o137.

An example is the bitlbee service with its least-authority wrapper: the
wrapper would create a tree with directories set to #o640, thereby
making the whole directory tree inaccessible.

* gnu/services/base.scm (syslog-shepherd-service): Pass #:file-creation-mask
to 'make-forkexec-constructor' instead of calling 'umask' in PID 1.
2023-05-11 13:21:45 +02:00
Ludovic Courtès
3a00aba9e9
services: dicod, bitlbee: Pass 'make-inetd-constructor' a list of endpoints.
'make-inetd-constructor' accepts a list of endpoints since version 0.9.1
of the Shepherd (released in May 2022).

* gnu/services/dict.scm (dicod-shepherd-service): Pass
'make-inetd-constructor' a list of endpoints.
* gnu/services/messaging.scm (bitlbee-shepherd-service): Likewise.
2023-05-11 13:21:45 +02:00
Christopher Baines
98c3931641
services: guix-build-coordinator-agent: Support max-parallel-uploads.
This should be usable with the new guile-gnutls.

* gnu/services/guix.scm
(guix-build-coordinator-agent-configuration-max-parallel-uploads): New
procedure.
* gnu/services/guix.scm (guix-build-coordinator-agent-shepherd-services): Use
the new argument.
* doc/guix.texi (Guix Services): Document it.
2023-05-10 11:06:20 +01:00
Christopher Baines
a759cbffaf
services: guix-build-coordinator: Support extra environment vars.
I'm looking at this because I need to do some debugging of Guile's GC, and
there are some useful environment variables for that, but it should be
generally useful.

* gnu/services/guix.scm (guix-build-coordinator-configuration-extra-environment-variables):
New procedure.
(guix-build-coordinator-shepherd-services): Pass the environment variables to
the shepherd.
* doc/guix.texi (Guix Services): Document it.
2023-05-09 16:19:21 +01:00
Efraim Flashner
c1ffe2f21b
service: qemu-binfmt: Remove broken qemu targets.
* gnu/services.virtualization.scm (%qemu-platforms): Remove %i486,
%aarch64be.
2023-05-09 17:27:49 +03:00
Christopher Baines
c229937c6a
services: guix-build-coordinator: Simpify service startup.
Take advantage of changes in the build coordinator to reduce the complexity of
the service startup script.

* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Remove the
metrics registry and datastore.
2023-05-06 12:51:51 +01:00
Efraim Flashner
0584f5b489
services: qemu-binfmt: Add more targets.
* gnu/services/virtualization.scm (%i486, %sparc64, %aarch64be, %xtensa,
%xtensaeb, %microblaze, %microblazeel, %or1k, %hexagon, %loongson64):
New variables.
(%armeb): Correct family field.
(%qemu-platforms): Add them.
2023-05-04 22:28:56 +03:00
Efraim Flashner
f66344ed81
services: earlyoom: Rotate log files.
* gnu/services/linux.scm (%earlyoom-log-rotation): New variable.
(earlyoom-service-type): Add service-extension for log rotation.
2023-05-04 21:32:32 +03:00
Maxim Cournoyer
6bc3e3f9ba
services: cups: Use cups-minimal to avoid PAM authentication.
Fixes <https://issues.guix.gnu.org/63198>.

Our CUPS service doesn't currently extend the PAM configuration, and prevents
users from authenticating.  Use cups-minimal, which has no PAM support.

* gnu/services/cups.scm (cups-configuration) [cups]: Use cups-minimal.
(opaque-cups-configuration): Likewise.
2023-05-03 08:20:31 -04:00
Josselin Poiret
9f09903aff
system: guix: Use config's ACL file location.
* gnu/services/base.scm (substitute-key-authorization): Use %acl-file instead of
hardcoded "/etc/guix/acl".

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-30 23:11:05 +02:00
Bruno Victal
9be1ee6a49
services: tor: Deprecate 'tor-hidden-service' procedure.
Due to (now renamed) 'hidden-service' record type not being exported, the only
way Onion services (formely hidden services) could have worked is through the
now deprecated 'tor-hidden-service' procedure.

This commit updates the Tor service documentation, corrects some inconsistently
named accessors in <tor-configuration> record-type, renames and refactors
tor-hidden-service-configuration to tor-onion-service-configuration using
define-configuration and also exports it, allowing Onion services to be
configured directly within a <tor-configuration> record.
Lastly, it also deprecates the 'tor-hidden-service' procedure.

* doc/guix.texi (Networking Services): Substitute mentions of “Hidden services”
with “Onion Services”. Add a Tor Onion service configuration example.
Document <tor-onion-service-configuration>. Remove mention of
'tor-hidden-service' procedure.
* gnu/services/networking.scm: Export tor-configuration-tor,
tor-configuration-config-file, tor-configuration-hidden-services,
tor-configuration-socks-socket-type, tor-configuration-control-socket-path,
tor-onion-service-configuration, tor-onion-service-configuration?,
tor-onion-service-configuration-name, tor-onion-service-configuration-mapping.
(<tor-configuration>)[control-socket?]: Rename accessor.
(<hidden-service>): Replace with …
(<tor-onion-service-configuration>): … this.
(tor-configuration->torrc): Update record-type name.
(tor-activation): Ditto.
(tor-hidden-service-type): Remove variable.
(tor-hidden-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-25 17:19:21 +02:00
Andreas Enge
d1252b597d
Merge remote-tracking branch 'origin/master' into core-updates 2023-04-22 09:21:22 +02:00
Ludovic Courtès
95731b4ef1
services: herd: 'load-services/safe' is synonymous with 'load-services'.
This is a followup to 547965aa27.

* gnu/services/herd.scm (load-services/safe): Make an alias for
'load-services'.
2023-04-21 16:16:37 +02:00
Ludovic Courtès
9385c82c54
services: nscd: Depend on syslogd.
This gets rid of nscd debug messages on the console at boot time.

* gnu/services/base.scm (nscd-shepherd-service): Add dependency on
'syslogd'.
2023-04-21 16:16:37 +02:00
Ludovic Courtès
e45306c198
services: postgresql: Add default package.
* gnu/services/databases.scm (<postgresql-configuration>)[postgresql]:
Add default value, moved from...
(postgresql-service-type)[default-value]: ... here.
2023-04-21 16:16:37 +02:00
Ludovic Courtès
1fa038324d
services: knot: Add 'configuration' action.
* gnu/services/dns.scm (knot-shepherd-service): Add 'actions' field.
2023-04-21 16:16:37 +02:00
Ludovic Courtès
70677d8822
services: rsync: Add 'configuration' action.
* gnu/services/rsync.scm (rsync-shepherd-service): Add 'actions' field.
2023-04-21 16:16:37 +02:00
Ludovic Courtès
0ac2ada05a
services: redis: Add 'configuration' action.
* gnu/services/databases.scm (redis-shepherd-service): Add 'actions'
field.
2023-04-21 16:16:36 +02:00
Ludovic Courtès
97f91aa4ac
services: mysql: Add 'configuration' action.
* gnu/services/databases.scm (mysql-shepherd-service): Add 'actions'
field.
2023-04-21 16:16:36 +02:00
Ludovic Courtès
a5fc3fc921
services: postgresql: Add 'configuration' action.
* gnu/services/databases.scm (postgresql-shepherd-service): Add
'actions' field.
2023-04-21 16:16:36 +02:00
Ludovic Courtès
7aaf278286
services: postgresql: Add the 'postgresql' Shepherd service name.
* gnu/services/databases.scm (postgresql-shepherd-service): Add
'postgresql' to 'provision'.
2023-04-21 16:16:36 +02:00
Maxim Cournoyer
2c1e17071d
services: syslog: Log auth.info to /var/log/secure in default configuration.
This causes authentication failures such as those generated by SSH brute force
attacks to appear in /var/log/secure, which is picked up by tools such as
fail2ban.

* gnu/services/base.scm (%default-syslog.conf): Add a auth.info selector for
the /var/log/secure log.

Series-to: 62802@debbugs.gnu.org
2023-04-21 09:04:40 -04:00
Maxim Cournoyer
9f890e39e4
services/syslog: Strip leading white space indent in syslog.conf.
This is a cosmetic change.

* gnu/services/base.scm (%default-syslog.conf): Add a comment referencing the
documentation.  Strip the extraneous leading trailing white space indent.
2023-04-21 09:04:40 -04:00
Maxim Cournoyer
2c67e98b37
services: syslog: Add a reload action.
* gnu/services/base.scm (syslog-service-type) [actions]: Add a reload action.
* doc/guix.texi (Base Services): Document it.
2023-04-21 09:04:40 -04:00
Maxim Cournoyer
1ae279d7c8
services: syslog: Move configuration to /etc/syslog.conf.
Having the configuration live at a static location makes it possible to
hot-reload it.

* gnu/services/base.scm (syslog.conf): New variable.
(syslog-etc, syslog-shepherd-service): New procedures.
(syslog-service-type): Rewrite using the above new variable and procedures,
extending etc-service-type with its configuration file.
2023-04-21 09:04:39 -04:00
Ludovic Courtès
2886a59d18
services: agetty: 'term-console' succeeds by default.
Previously, on a typical setup without "console=ttyS0" or similar in
'kernel-arguments', the 'term-console' Shepherd service would always be
marked as failing to start.  This is undesirable because it raises a
false alarm: the service is expected to do nothing in this case.

This patch instead marks it as succeeding and logs a message explaining
it's doing nothing.

* gnu/services/base.scm (agetty-shepherd-service): In 'start' method,
succeed when TTY is #f and print a message.
2023-04-19 20:12:20 -04:00
Ludovic Courtès
57e731c358
services: agetty: 'term-console' succeeds by default.
Previously, on a typical setup without "console=ttyS0" or similar in
'kernel-arguments', the 'term-console' Shepherd service would always be
marked as failing to start.  This is undesirable because it raises a
false alarm: the service is expected to do nothing in this case.

This patch instead marks it as succeeding and logs a message explaining
it's doing nothing.

* gnu/services/base.scm (agetty-shepherd-service): In 'start' method,
succeed when TTY is #f and print a message.
2023-04-17 23:50:41 +02:00
Maxim Cournoyer
3bacd3c76a
Merge branch 'master' into core-updates.
Conflicts:
	gnu/local.mk
	gnu/packages/build-tools.scm
	gnu/packages/certs.scm
	gnu/packages/check.scm
	gnu/packages/compression.scm
	gnu/packages/cups.scm
	gnu/packages/fontutils.scm
	gnu/packages/gnuzilla.scm
	gnu/packages/guile.scm
	gnu/packages/ibus.scm
	gnu/packages/image-processing.scm
	gnu/packages/linux.scm
	gnu/packages/music.scm
	gnu/packages/nss.scm
	gnu/packages/pdf.scm
	gnu/packages/python-xyz.scm
	gnu/packages/qt.scm
	gnu/packages/ruby.scm
	gnu/packages/shells.scm
	gnu/packages/tex.scm
	gnu/packages/video.scm
	gnu/packages/vulkan.scm
	gnu/packages/web.scm
	gnu/packages/webkit.scm
	gnu/packages/wm.scm
2023-04-14 17:15:08 -04:00
Bruno Victal
865df7f080
services: mpd: Use proper records for user and group fields.
Deprecate using strings for these fields and prefer user-account
(resp. user-group) instead to avoid duplication within account-service-type.

Fixes #61570 <https://issues.guix.gnu.org/61570>.

* gnu/services/audio.scm (%mpd-user, %mpd-group)
(mpd-serialize-user-account, mpd-serialize-user-group)
(mpd-user-sanitizer, mpd-group-sanitizer): New variables.
(mpd-configuration)[user]: Use user-account as value type.
Sanitize via mpd-user-sanitizer.
[group]: Use user-group as value type.
Sanitize via mpd-group-sanitizer.
(mpd-shepherd-service): Adjust accordingly.
(mpd-accounts): Likewise.
* doc/guix.texi (Audio Services)[Music Player Daemon]: Likewise.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-14 15:12:11 -04:00
Bruno Victal
420adff18e
services: mpd: Fix unintentional API breakage for mixer-type field.
* gnu/services/audio.scm (mpd-output)[mixer-type]: Use sanitizer to
accept both strings and symbols as values.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-14 15:12:11 -04:00
Bruno Victal
337e681b7a
services: nginx: Add reopen action.
This is required to allow log file rotations using rottlog, etc.

* gnu/services/web.scm (nginx-shepherd-service): Add reopen shepherd action.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-04-11 12:19:01 -04:00
Bruno Victal
dd10ba4184
services: nginx: Make logging level configurable.
* gnu/services/web.scm (<nginx-configuration>)[log-level]: New field.
(assert-valid-log-level): New procedure.
(default-nginx-config): Make log-level configurable.
* doc/guix.texi (Web Services): Document it.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-04-11 12:19:01 -04:00
Bruno Victal
6586c114e9
services: desktop: Remove 'xfce-desktop-service' procedure.
* gnu/services/desktop.scm (xfce-desktop-service): Remove procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:58:33 +02:00
Bruno Victal
74c188ecc7
services: desktop: Remove 'mate-desktop-service' procedure.
* gnu/services/desktop.scm (mate-desktop-service): Remove procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:58:27 +02:00
Bruno Victal
21e8a10852
services: desktop: Remove 'gnome-desktop-service' procedure.
* gnu/services/desktop.scm (gnome-desktop-service): Remove procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:57:27 +02:00
Bruno Victal
d442b77596
services: guix-publish: Remove 'compression-level' field.
* gnu/services/base.scm (<guix-publish-configuration>)[compression-level]: Remove field.
(guix-publish-configuration-compression-level): Remove procedure.
(default-compression): Remove compression-level helper code.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:57:18 +02:00
Bruno Victal
189d30d727
services: base: Remove 'console-font-service' procedure.
* gnu/services/base.scm (console-font-service): Remove procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:57:07 +02:00
Bruno Victal
4f27c4e681
services: base: Remove 'console-keymap-service-type' variable.
* gnu/services/base.scm (console-keymap-service-type): Remove variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:57:02 +02:00
Bruno Victal
aeb5df82dd
services: sddm: Remove 'sddm-service' procedure.
* gnu/services/sddm.scm (sddm-service): Remove procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:56:55 +02:00
Bruno Victal
b92880d011
services: ntp-service-type: Remove deprecated server as strings support.
* gnu/services/networking.scm (<ntp-configuration>)[servers]: Rename accessor to ntp-configuration-servers.
(ntp-configuration-servers): Remove helper procedure.
(ntp-shepherd-service): Remove helper procedure usage.
* tests/networking.scm: Remove obsolete test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:56:07 +02:00
Maxim Cournoyer
1d0158ab90
services: xvnc: Do not create a regular HOME directory for xvnc user.
* gnu/services/vnc.scm (%xvnc-accounts)
[home-directory]: Define as /var/empty.
[shell]: Set to nologin, for good measures.
2023-04-02 23:35:15 -04:00
Bruno Victal
380faf265b
services: mympd: Use records for user and group fields.
* gnu/services/audio.scm (%mympd-user, %mympd-group)
(mympd-user-sanitizer, mympd-group-sanitizer): New variables.
(mympd-configuration)[user]: Use user-account as value type.
Sanitize via mympd-user-sanitizer.
[group]: Use user-group as value type.
Sanitize via mympd-group-sanitizer.
(mympd-serialize-configuration): Adjust accordingly.
(mympd-accounts): Likewise.
* doc/guix.texi (Audio Services)[myMPD]: Likewise.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-02 12:38:45 +02:00
Bruno Victal
7fdadeac11
services: mpd: Use proper records for user and group fields.
Deprecate using strings for these fields and prefer user-account
(resp. user-group) instead to avoid duplication within account-service-type.

Fixes #61570 <https://issues.guix.gnu.org/61570>.

* gnu/services/audio.scm (%mpd-user, %mpd-group)
(mpd-serialize-user-account, mpd-serialize-user-group)
(mpd-user-sanitizer, mpd-group-sanitizer): New variables.
(mpd-configuration)[user]: Use user-account as value type.
Sanitize via mpd-user-sanitizer.
[group]: Use user-group as value type.
Sanitize via mpd-group-sanitizer.
(mpd-shepherd-service): Adjust accordingly.
(mpd-accounts): Likewise.
* doc/guix.texi (Audio Services)[Music Player Daemon]: Likewise.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-02 12:35:30 +02:00
Bruno Victal
2c4df1a41a
services: mpd: Fix unintentional API breakage for mixer-type field.
* gnu/services/audio.scm (mpd-output)[mixer-type]: Use sanitizer to
accept both strings and symbols as values.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-02 12:35:30 +02:00
Bruno Victal
0fbb356714
services: replace bare serializers with (serializer ...)
* gnu/home/services/shells.scm
(home-zsh-configuration)[environment-variables]: Use (serializer ...).
(home-bash-configuration)[aliases, environment-variables]: Likewise.
(home-fish-configuration)[abbreviations, aliases]
[environment-variables]: Likewise.
* gnu/services/audio.scm (mpd-configuration)[music-dir, playlist-dir]
[endpoints, address, inputs, archive-plugins, input-cache-size]
[decoders, filters, playlist-plugins]: Likewise.
* gnu/services/linux.scm (fstrim-configuration)[extra-arguments]:
Likewise.
* gnu/services/security.scm (fail2ban-jail-configuration)[backend]
[log-encoding, extra-content]: Likewise.
* tests/services/configuration.scm: Update tests.
("serialize-configuration [deprecated]"): New test.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-02 12:35:30 +02:00
Bruno Victal
6f48efa9b8
services: configuration: Add user-defined sanitizer support.
This changes the 'custom-serializer' field into a generic
'extra-args' field that can be extended to support new literals.
Within extra-args, the literals 'sanitizer' and 'serializer' allow
for user-defined sanitization and serialization procedures respectively.
The 'empty-serializer' was also added as a literal to be used as before.

To prevent confusion between the new “explicit” style of specifying
a sanitizer, and the old “implicit” style, the latter has been
deprecated, and a warning is issued if it is encountered.

* gnu/services/configuration.scm (define-configuration-helper):
Rename 'custom-serializer' to 'extra-args'.  Add support for literals
'sanitizer', 'serializer' and 'empty-serializer'.  Rename procedure
'field-sanitizer' to 'default-field-sanitizer' to avoid syntax clash.
Only define default field sanitizers if user-defined ones are absent.
(normalize-extra-args): New variable.
(<configuration-field>)[sanitizer]: New field.
* doc/guix.texi (Complex Configurations): Document the newly added
literals.
* tests/services/configuration.scm: Add tests for the new literals.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-02 12:31:51 +02:00
Bruno Victal
6d0ad93020
services: pam-limits-service-type: Deprecate file-like object support in favour for lists as service value.
* doc/guix.texi (Base Services): Document it.
* gnu/local.mk: Register test.
* gnu/services/base.scm (pam-limits-service-type): Accept both lists and
file-like objects. Deprecate file-like object support.
* gnu/tests/pam.scm: New file.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-30 23:18:16 +02:00
Bruno Victal
ed50531885
services: base: Deprecate 'pam-limits-service' procedure.
* doc/guix.texi (Base Services): Replace pam-limits-service with pam-limits-service-type.
* gnu/packages/benchmark.scm (python-locust)[description]: Update index anchor to manual.
* gnu/services/base.scm (pam-limits-service-type): Set default value.
(pam-limits-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-30 23:18:16 +02:00
Bruno Victal
bd932c1855
services: configuration: Fix garbage output in configuration->documentation.
Fixes <https://issues.guix.gnu.org/57958>.

* gnu/services/configuration.scm (define-configuration-helper): Remove call
to display within default-value-thunk.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-29 22:37:43 -04:00
Bruno Victal
f215d80127
services: fstrim: Fix schedule ungexp.
Previously, only the first level of the list would be quoted,
resulting in a schedule of the sort:
'(next-second (range 0 60 30))
being incorrectly ungexp'd into:
(list next-second (0 30))

* gnu/services/linux.scm (fstrim-mcron-job): Fix schedule ungexp.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-28 22:22:51 -04:00
Ludovic Courtès
3b9738aeac
services: ntpd: Add 'configuration' action.
* gnu/services/networking.scm (ntp-shepherd-service): Add 'actions'
field.
2023-03-27 18:48:51 +02:00
Ludovic Courtès
82607c442b
services: network-manager: Add 'configuration' action.
* gnu/services/networking.scm (network-manager-shepherd-service): Add
'actions' field.
2023-03-27 18:48:51 +02:00
Ludovic Courtès
384856c9fb
services: syslog: Add 'configuration' action.
* gnu/services/base.scm (syslog-service-type): Add 'actions' field.
2023-03-27 18:48:51 +02:00
Ludovic Courtès
547965aa27
services: herd: Remove workaround for Shepherd < 0.5.0.
* gnu/services/herd.scm (load-services/safe): Remove workaround for
Shepherd < 0.5.0, released in 2018.
2023-03-26 23:24:23 +02:00
r0man
a7f118d062
services: xorg-wrapper: Support xorg server input rewriting.
This patch adds support for proper xorg server input rewriting. It uses the
lookup-package-direct-input procedure to configure the X server paths
dynamically, instead of always using the hard coded package. Something like
this is now possible:

(define other-mesa
  (package-input-rewriting/spec `(("mesa" . ,(const other-mesa)))))

(xorg-configuration
 (xorg-configuration
  (server (other-mesa xorg-server))))

Without this patch the X server would still be configured with mesa (causing
version issues), and not with other-mesa (as per the input rewrite).

* gnu/services/xorg.scm (xorg-configuration-server-package-path)
(xorg-configuration-dri-driver-path, xorg-configuration-xkb-bin-dir)
(xorg-configuration-xkb-dir): New procedures.
(xorg-wrapper): Use them for dri and xkb paths.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-03-25 10:06:36 +08:00
Bruno Victal
bc30a9ee88
services: mpd: Set PulseAudio-related variables.
These variables are necessary for PulseAudio to work properly out-of-the-box
for 'non-interactive' users.

* doc/guix.texi (Audio Services): Update environment-variables field description for
mpd-configuration data type.
* gnu/services/audio.scm (mpd-configuration)[environment-variables]: Set
PULSE_CLIENTCONFIG and PULSE_CONFIG environment variables to the system-wide
PulseAudio configuration.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-24 11:01:01 -04:00
Bruno Victal
206446b484
services: audio: Remove redundant list-of-string? predicate.
Use list-of-strings? predicate defined in (gnu services configuration).

* gnu/services/audio.scm (list-of-string?): Remove predicate.
(mpd-serialize-list-of-string): Rename procedure to ...
(mpd-serialize-list-of-strings): ... this.
(mpd-configuration)[environment-variables]: Switch to list-of-strings.
[endpoints]: Switch to maybe-list-of-strings.
(mympd-ip-acl)[allow, deny]: Switch to list-of-strings.
(mympd-serialize-configuration): Rename serialize-list-of-string to
serialize-list-of-strings.
* doc/guix.texi (Audio Services): Update it.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-24 10:55:40 -04:00
Bruno Victal
0185b2f9b2
services: mympd: Require 'syslog service when configured to log to syslog.
* gnu/services/audio.scm (mympd-shepherd-service): Depend on 'syslog when
configured to log to syslog.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-24 10:55:40 -04:00
Maxim Cournoyer
ef71e32909
services: network-manager: Set LINUX_MODULE_DIRECTORY environment variable.
Fixes <https://issues.guix.gnu.org/62409>.

* gnu/services/networking.scm (network-manager-shepherd-service): Set the
LINUX_MODULE_DIRECTORY environment variable.
2023-03-23 17:10:01 -04:00
Bruno Victal
72ef1bef07
services: Add fstrim-service-type.
* gnu/services/linux.scm (fstrim-service-type): New variable.
(fstrim-mcron-job, serialize-fstrim-configuration)
(fstrim-serialize-list-of-strings, fstrim-serialize-boolean): New procedure.
(mcron-time?): New predicate.
(fstrim-configuration): New record.
* doc/guix.texi (Linux Services): Document new fstrim-service-type.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-22 10:09:03 -04:00
Bruno Victal
b7506eb334
services: Add x11-socket-directory-service-type.
The x11-socket-directory-service misuses activation-service-type
to create directories. This kind of usage is incorrect since
activation-service-type does not depend on file-systems, hence incompatible
with user defined /tmp mount.

This commit turns x11-socket-directory-service into a shepherd one-shot
service by defining a new x11-socket-directory-service-type.

* gnu/services/desktop.scm (x11-socket-directory-service-type): New variable.
(x11-socket-directory-service): Deprecate procedure.
(desktop-services-for-system): Use new service-type.
* gnu/tests/lightdm.scm: Ditto.

Reviewed-by: Josselin Poiret <dev@jpoiret.xyz>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-21 16:53:27 -04:00
Bruno Victal
c88582a674
services: mcron: Add log-file and date-format fields.
* doc/guix.texi (Scheduled Job Execution): Document it.
* gnu/services/mcron.scm (mcron-configuration)[log-file, date-format]: New field.
(mcron-shepherd-services): Add log-file and date-format support.
Use file-append instead of string-append.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-21 14:51:24 -04:00
Bruno Victal
edb398449f
services: mcron: Use match-record.
* gnu/services/mcron.scm (mcron-shepherd-services): Use match-record.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-21 14:31:22 -04:00
Bruno Victal
6f4fd8f5b8
services: mcron: Restyle mcron-configuration.
* doc/guix.texi (Scheduled Job Execution): Sync doc with source.
* gnu/services/mcron.scm (mcron-configuration): Restyle.
[log-format]: Fix incorrectly formatted text.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-21 14:31:22 -04:00
Ludovic Courtès
0143e3f291
services: static-networking: 'eval-when' for code used at expansion-time.
Reported by bjc on #guix.

* gnu/services/base.scm (valid-name, cidr->netmask): Wrap in 'eval-when'
since they are used by "compile-time procedures" (macros).
2023-03-21 19:13:32 +01:00
Bruno Victal
eba81e68ac
services: configuration: simplify alist? procedure.
* gnu/services/configuration.scm (alist?): simplify procedure.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-03-21 09:41:42 -04:00
Andreas Enge
ccb62d8feb
Merge remote-tracking branch 'origin/master' into core-updates 2023-03-20 18:49:06 +01:00
Andrew Tropin
3a2200e1ad
services: network-manager: Add missing shadowing of 'iwd?' field.
* gnu/services/networking.scm (network-manager-shepherd-service): Add missing
shadowing of 'iwd?' field by using let* instead of let.
2023-03-20 12:08:36 +04:00
Bruno Victal
20aa4c30fb
services: dict: Deprecate 'dicod-service' procedure.
* doc/guix.texi (Miscellaneous Services): Remove 'dicod-service' mention.
* gnu/services/dict.scm (dicod-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-17 23:20:36 +01:00
Ludovic Courtès
b5a70370f5
services: console-font: 'stop' method always returns #f.
The 'stop' method of Shepherd services is supposed to return #f on
success.

* gnu/services/base.scm (console-font-shepherd-services): 'stop' method
returns #f.
2023-03-17 23:20:35 +01:00
Andrew Tropin
d4b2f5eace
services: dns: Fix cpe-id default value.
* gnu/service/dns.scm: (<dnsmasq-configuration>)[cpe-id]: Change cpe-id
default value to #f instead of #t.
2023-03-13 17:11:08 +04:00
Sergey Trofimov
d1edb26388
services: dns: Extend dnsmasq-configuration.
* gnu/service/dns.scm: (<dnsmasq-configuration>)[servers-file]: Add.
(<dnsmasq-configuration>)[tftp-secure?]: Fix typo in parameter name.
* doc/guix.texi: Document (<dnsmasq-configuration>)[servers-file].

Signed-off-by: Andrew Tropin <andrew@trop.in>
2023-03-13 17:06:19 +04:00
Bruno Victal
5627c73a9e
services: xorg: Deprecate 'screen-locker-service' procedure.
* doc/guix.texi (X Window): Replace 'screen-locker-service' with 'screen-locker-service-type'.
Document <screen-locker-configuration>.
* gnu/services/desktop.scm (desktop-services-for-system): Use screen-locker-service-type.
* gnu/services/xorg.scm: Export accessors for <screen-locker-configuration>.
(<screen-locker>): Rename to ...
(<screen-locker-configuration>): ... this.
(<screen-locker-configuration>)[empty?]: Rename to ...
(<screen-locker-configuration>)[allow-empty-password?]: ... this.
(screen-locker-pam-services): Update record name.
(screen-locker-setuid-programs): Update accessor name.
(screen-locker-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:58 +01:00
Bruno Victal
1a6f230dd3
services: connman: Set service canonical-name to connman.
* gnu/services/networking.scm (connman-shepherd-service): Make 'networking a
virtual service and set 'connman as its canonical name.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:58 +01:00
Bruno Victal
c122fe37d5
services: network-manager: Set service canonical-name to NetworkManager.
According to the semantics in [1], 'networking should be a "virtual service"
and NetworkManager its canonical-name. This does not influence
existing services and they should continue to use the 'networking symbol.

One visible change is that 'herd status' doesn't show 'networking' anymore,
instead listing 'NetworkManager' in its place but both symbols are can be used
to start and stop the same service.

Note: Though the symbol NetworkManager doesn't really conform with the overall kebab-case
used throughout Guix, this is intentional as we really want to make it clear that
that the symbol NetworkManager really refers to the software called NetworkManager,
since it's a canonical name here. (rather than risk misleading the user to interpret
the symbol network-manager as a symbol for some unspecific network management software)

[1]: https://www.gnu.org/software/shepherd/manual/html_node/Jump-Start.html

* gnu/services/networking.scm (network-manager-shepherd-service): Make 'networking a
virtual service and set 'NetworkManager as its canonical name.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:58 +01:00
Bruno Victal
d04955972e
services: network-manager: Await for NetworkManager to finish starting up.
This is similar to its NetworkManager-wait-online.service systemd counterpart,
with the main difference being that we handle it all in 'networking symbol, rather than
introduce a new 'networking-online symbol. (see discussion #47253)

As a result of this change, with opensmtpd-service-type as an example,
manual 'herd restart smtpd' after system bootups are no longer required
when opensmtpd is configured with a smtpd.conf containing non-loopback interfaces.
(this issue is described in more detail at #60300)

Fixes <https://issues.guix.gnu.org/60300>.

* gnu/services/networking.scm (network-manager-shepherd-service): Await for
NetworkManager to finish starting up.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:58 +01:00
Bruno Victal
17c80118fa
services: connman: Deprecate 'iwd?' field.
* gnu/services/networking.scm (<connman-configuration>)
[iwd?]: Use helper to warn deprecated field.
(connman-shepherd-service): Make iwd? a local variable independent from
the deprecated field.
* doc/guix.texi (Networking Setup): Remove mention of iwd? field.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:57 +01:00
Bruno Victal
269871d18e
services: connman: Add 'shepherd-requirement' field.
* gnu/services/networking.scm (<connman-configuration>)
[shepherd-requirement]: New field.
(connman-shepherd-service): Honor it.
(connman-configuration-shepherd-requirement): Export accessor.
* doc/guix.texi (Networking Setup): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:57 +01:00
Bruno Victal
1545dab1fa
services: connman: Use match-record and export accessors.
* gnu/services/networking.scm (connman-shepherd-service): Use match-record.
(connman-configuration-connman, connman-configuration-disable-vpn?)
(connman-configuration-iwd?): Export accessors.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:57 +01:00
Bruno Victal
1e1b3ec012
services: network-manager: Deprecate 'iwd?' field.
* gnu/services/networking.scm (warn-iwd?-field-deprecation): New procedure,
helper for deprecated field.
(<network-manager-configuration>)[iwd?]: Use helper to warn deprecated field.
(network-manager-shepherd-service): Make iwd? a local variable independent
from the deprecated field.
* doc/guix.texi (Networking Setup): Remove mention of iwd? field.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:57 +01:00
Bruno Victal
7777d767a4
services: network-manager: Add 'shepherd-requirement' field.
Note: This also makes wpa-supplicant an optional requirement.

* gnu/services/networking.scm (<network-manager-configuration>)
[shepherd-requirement]: New field.
(network-manager-shepherd-service): Honor it.
(network-manager-configuration-shepherd-requirement): Export accessor.
* doc/guix.texi (Networking Setup): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-10 14:49:57 +01:00
Bruno Victal
8390b47c04
services: ladspa: Export accessors.
* gnu/service/sound.scm: Export ladspa-configuration? and
ladspa-configuration-plugins.
(<ladspa-configuration>)[plugins]: Rename accessor to ladspa-configuration-plugins.
(ladspa-environment): Adjust to use renamed plugin accessor.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-07 11:39:50 +01:00
Bruno Victal
16a48d94bc
services: alsa: Export accessors.
* gnu/services/sound.scm: Export alsa-configuration?,
alsa-configuration-alsa-plugins, alsa-configuration-pulseaudio?
and alsa-configuration-extra-options.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-07 11:39:49 +01:00
Bruno Victal
25638729cb
services: pulseaudio: Export accessors.
* gnu/services/sound.scm: Export pulseaudio-configuration?,
pulseaudio-configuration-client-conf, pulseaudio-configuration-daemon-conf,
pulseaudio-configuration-script-file, pulseaudio-configuration-extra-script-files
and pulseaudio-configuration-system-script-file.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-07 11:39:49 +01:00
Felix Lechner
882112b581
services: knot: Default zone-file-refresh to 12h.
The Knot DNS service in Guix uses two days, or 48 hours, for the SOA
refresh interval but that is outside the range of RFC 1912, which is
entitled "Common DNS Operational and Configuration Errors." [1]

Section 2.2 of RFC 1912 recommends a maximum of 12 hours for the SOA
refresh rate: "You can keep it short (20 mins to 2 hours) if you
aren't worried about a small increase in bandwidth used, or longer
(2-12 hours) if your Internet connection is slow or is started on
demand."

This commit sets the default refresh interval at the nearest value
recommended by the standard, which is 12 hours.

Due to the widespread adoption of NOTIFY messages between primary and
secondary DNS servers, the SOA refresh interval has arguably lost some
importance, but the Guix default should still be in line with the
standards.

Values outside the recommended range can provoke warning messages from
services commonly used to find bugs in DNS configurations, such as the
MX Toolbox Super Tool. [2]

[1] https://datatracker.ietf.org/doc/rfc1912/
[2] https://mxtoolbox.com/SuperTool.aspx

* gnu/services/dns.scm (<zone-file>)[refresh]: Default to (* 12 3600).

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-03-06 16:10:27 +08:00
Christopher Baines
7df09ee0ab
Merge remote-tracking branch 'savannah/master' into core-updates
Conflicts:
	gnu/local.mk
	gnu/packages/autotools.scm
	gnu/packages/cmake.scm
	gnu/packages/gnuzilla.scm
	gnu/packages/haskell.scm
	gnu/packages/pdf.scm
	gnu/packages/python-xyz.scm
	gnu/packages/samba.scm
	gnu/packages/tex.scm
	gnu/packages/tls.scm
	gnu/packages/wxwidgets.scm
2023-03-02 10:55:08 +00:00
Ricardo Wurmus
d7f9eb0e87
gnu: sugar-desktop-configuration: Allow specification of activities.
* gnu/services/desktop.scm (<sugar-desktop-configuration>): Add new fields for
activities and gobject-introspection.
(sugar-gobject-introspection, sugar-activities): New procedures.
(sugar-desktop-service-type): Install packages for activities and
gobject-introspection alongside the sugar package.
* doc/guix.texi (Desktop Services): Document changes.
2023-02-28 23:17:22 +01:00
Ricardo Wurmus
6118c1e228
services: Add sugar-desktop-service-type.
* gnu/services/desktop.scm (sugar-desktop-service-type): New variable.
(sugar-polkit-settings, sugar-desktop-configuration,
make-sugar-desktop-configuration, sugar-desktop-configuration?,
sugar-package): New procedures.
(<sugar-desktop-configuration>): New record.
* doc/guix.texi (Desktop Services): Document it.
2023-02-28 18:12:19 +01:00
Ludovic Courtès
43c36c5c9f
ui: 'display-hint' quotes extra arguments for Texinfo.
Fixes <https://issues.guix.gnu.org/61201>.

Previously, common practice was to splice arbitrary strings (user names,
file names, etc.) into Texinfo snippets passed to 'display-hint'.  This
is unsafe in the general case because at signs and braces need to be
escaped to produced valid Texinfo.  This commit addresses that.

* guix/ui.scm (texinfo-quote): New procedure.
(display-hint): When ARGUMENTS is non-empty, pass it to 'texinfo-quote'
and call 'format'.
(report-unbound-variable-error, check-module-matches-file)
(display-collision-resolution-hint, run-guix-command): Remove explicit
'format' call; pass 'format' arguments as extra arguments to 'display-hint'.
* gnu/services/monitoring.scm (zabbix-front-end-config): Likewise.
* guix/scripts.scm (warn-about-disk-space): Likewise.
* guix/scripts/build.scm (%standard-cross-build-options)
(%standard-native-build-options): Likewise.
* guix/scripts/describe.scm (display-checkout-info): Likewise.
* guix/scripts/environment.scm (suggest-command-name): Likewise.
* guix/scripts/home.scm (process-command): Likewise.
* guix/scripts/home/edit.scm (service-type-not-found): Likewise.
* guix/scripts/import.scm (guix-import): Likewise.
* guix/scripts/package.scm (display-search-path-hint): Likewise.
* guix/scripts/pull.scm (build-and-install): Likewise.
* guix/scripts/shell.scm (auto-detect-manifest): Likewise.
* guix/scripts/system.scm (check-file-system-availability): Likewise.
(guix-system): Likewise.
* guix/scripts/system/edit.scm (service-type-not-found): Likewise.
* guix/status.scm (print-build-event): Likewise.
2023-02-27 23:40:43 +01:00
Bruno Victal
cd22932945
services: desktop: Set default value for geoclue-service-type.
This follows up on commit ae0975332c60818793c6c63a3646c982d686bf49?.

* gnu/services/desktop.scm (geoclue-service-type): Set default-value.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2023-02-26 01:00:07 +01:00
Bruno Victal
2799ad4423
services: dbus: Deprecate 'dbus-service' procedure.
* doc/guix.texi (Desktop Services): Replace with 'dbus-root-service-type'.
Document dbus-configuration.
* gnu/services/dbus.scm (dbus-service): Define with 'define-deprecated'.
* gnu/services/desktop.scm (desktop-services-for-system): Replace with
dbus-root-service-type.
* gnu/system/install.scm (%installation-services): Ditto.
* gnu/tests/base.scm (%avahi-os): Ditto.
* gnu/tests/docker.scm (%docker-os): Ditto.
* gnu/tests/lightdm.scm (minimal-desktop-services): Ditto.
* gnu/tests/virtualization.scm (%libvirt-os): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:35 +01:00
Bruno Victal
7c23dab85c
services: spice: Deprecate 'spice-vdagent-service' procedure.
* doc/guix.texi (Miscellaneous Services): Replace 'spice-vdagent-service' with
'spice-vdagent-service-type'. Document <spice-vdagent-configuration>.
* gnu/services/spice.scm (spice-vdagent-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:35 +01:00
Bruno Victal
e24555234a
services: lirc: Deprecate 'lirc-service' procedure.
* doc/guix.texi (Miscellaneous Services): Replace 'lirc-service' with 'lirc-service-type'.
Document <lirc-configuration>.
* gnu/services/lirc.scm (<lirc-configuration>): Set default values based on
the arguments from the now deprecated 'lirc-service' procedure.
(lirc-service-type): Set default value.
(lirc-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:34 +01:00
Bruno Victal
eddd9b1240
services: vpn: Deprecate 'openvpn-client-service' & 'openvpn-server-service' procedures.
* doc/guix.texi (VPN Services): Replace 'openvpn-client-service' & 'openvpn-server-service' procedures
with their service-type counterparts.
* gnu/services/vpn.scm (openvpn-client-service, openvpn-server-service): Deprecate procedure.
(openvpn-server-service-type, openvpn-client-service-type): Set default value.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:34 +01:00
Bruno Victal
c6cbce9ad8
services: mail: Deprecate 'dovecot-service' procedure.
* doc/guix.texi (Mail Services): Replace 'dovecot-service' with 'dovecot-service-type'.
* gnu/services/mail.scm (dovecot-service-type): Set default value.
(dovecot-service): Deprecate procedure.
* gnu/tests/mail.scm (%dovecot-os): Use dovecot-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:34 +01:00
Bruno Victal
be1435d668
services: desktop: Deprecate 'bluetooth-service' procedure.
* doc/guix.texi (Desktop Services): Remove mention of 'bluetooth-service'.
* gnu/services/desktop.scm (bluetooth-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:34 +01:00
Bruno Victal
ae0975332c
services: desktop: Deprecate 'geoclue-service' procedure.
* doc/guix.texi (Desktop Services): Replace 'geoclue-service' with 'geoclue-service-type'.
* gnu/services/desktop.scm (<geoclue-configuration>): Set default values
based on the values from the now deprecated geoclue-service procedure.
(geoclue-service): Deprecate procedure.
(desktop-services-for-system): Use geoclue-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:34 +01:00
Bruno Victal
e8f161ea11
services: desktop: Deprecate 'udisks-service' procedure.
* doc/guix.texi (Desktop Services): Replace 'udisks-service' with 'udisks-service-type'.
Document <udisks-configuration>.
* gnu/packages/kde-multimedia.scm (k3b)[description]: Replace 'udisks-service' with 'udisks-service-type'.
* gnu/services/desktop.scm (udisks-service-type): Set default value.
(udisks-service): Deprecate procedure.
(desktop-services-for-system): Use udisks-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:34 +01:00
Bruno Victal
ffc5d42fc2
services: dbus: Deprecate 'polkit-service' procedure.
* doc/guix.texi (Desktop Services): Replace 'polkit-service' with 'polkit-service-type'.
* gnu/services/dbus.scm (polkit-service): Deprecate procedure.
* gnu/tests/docker.scm (%docker-os): Use polkit-service-type.
* gnu/tests/virtualization.scm (%libvirt-os): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:34 +01:00
Bruno Victal
c3dc13e29c
services: desktop: Deprecate 'accountsservice-service' procedure.
* doc/guix.texi (Desktop Services): Replace 'accountsservice-service'
with 'accountsservice-service-type'.
* gnu/services/desktop.scm (accountsservice-service): Deprecate procedure.
(desktop-services-for-system): Use accountsservice-service-type.
* gnu/tests/lightdm.scm (minimal-desktop-services): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:33 +01:00
Bruno Victal
ca3a73de3d
services: elogind-configuration: Do not ignore 'handle-hibernate-key' by default.
* gnu/services/desktop.scm (<elogind-configuration>)[handle-hibernate-key]: Set default value to 'hibernate.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:33 +01:00
Bruno Victal
00767d967d
services: desktop: Deprecate 'elogind-service' procedure.
* doc/guix.texi (Desktop Services): Replace 'elogind-service' with
'elogind-service-type'.
* gnu/services/desktop.scm (elogind-service): Deprecate procedure.
(desktop-services-for-system): Use elogind-service-type.
* gnu/tests/lightdm.scm (minimal-desktop-services): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:33 +01:00
Bruno Victal
3b2e88011a
services: ssh: Deprecate 'dropbear-service' procedure.
* doc/guix.texi (Networking Services): Replace 'dropbear-service' with
'dropbear-service-type'.
* gnu/services/ssh.scm (dropbear-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:33 +01:00
Bruno Victal
0e21015fd2
services: ssh: Deprecate 'lsh-service' procedure.
* doc/guix.texi (Networking Services): Remove mention of lsh-service.
Document lsh-service-type and lsh-service-configuration.
* gnu/services/ssh.scm (<lsh-configuration>): Set default values based
on the now deprecated 'lsh-service' procedure.
(lsh-service-type): Set default value.
(lsh-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:33 +01:00
Bruno Victal
31b1e22926
services: base: Deprecate 'rngd-service' procedure.
* doc/guix.texi (Base Services): Replace rngd-service with rngd-service-type.
Document <rngd-configuration>.
* gnu/services/base.scm (<rngd-configuration>): Set default values from
the values in the now deprecated 'rngd-service' procedure.
(rngd-service): Deprecate procedure.
(rngd-service-type): Set default value.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:33 +01:00
Bruno Victal
2e7516168e
services: base: Deprecate 'udev-service' procedure.
* doc/guix.texi (Base Services): Replace udev-service with udev-service-type.
Document <udev-configuration>. Use @defun @-commands for udev-rules-service,
udev-rule and file->udev-rule.
* gnu/services/base.scm (udev-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use udev-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
6edacf2491
services: base: Deprecate 'syslog-service' procedure.
* doc/guix.texi (Base Services): Replace syslog-service with syslog-service-type.
* gnu/services/base.scm (%default-syslog.conf): Place before <syslog-configuration>.
(syslog-service-type): Set default value.
(syslog-service): Deprecate procedure.
(%base-services): Use syslog-service-type.
* gnu/system/hurd.scm (%base-services/hurd): Ditto.
* gnu/system/install.scm (%installation-services): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
98e9dc6ab7
services: base: Deprecate 'nscd-service' procedure.
* doc/guix.texi (Application Setup): Compress @cindex entries.
(Base Services): Compress @cindex entries. Delete %nscd-default-configuration.
Replace 'nscd-service' with 'nscd-service-type'.
* gnu/services/base.scm (%nscd-default-configuration): Deprecate variable.
(nscd-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use nscd-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
4892c0186e
services: base: Deprecate 'agetty-service' procedure.
* doc/guix.texi (Base Services): Replace agetty-service with
agetty-service-type.
* gnu/services/base.scm (agetty-service): Deprecate procedure.
* gnu/system/examples/beaglebone-black.tmpl
(operating-system)[services]: Use agetty-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
ad665a38fc
services: base: Deprecate 'mingetty-service' procedure.
* doc/guix.texi (Base Services): Replace mingetty-service with
mingetty-service-type.
* gnu/services/base.scm (mingetty-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
6dd635b4cf
services: base: Deprecate 'login-service' procedure.
* doc/guix.texi (Base Services): Replace with login-service-type.
* gnu/services/base.scm (login-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use login-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
cb00e600ff
services: base: Deprecate 'host-name-service' procedure.
* doc/guix.texi (operating-system Reference): Reorder cross-reference.
Add an anchor to be used ...
(Base services): ... here by host-name-service-type. Document
host-name-service-type.
* gnu/services/base.scm: Export host-name-service-type.
(host-name-service): Deprecate procedure.
* gnu/system.scm (operating-system-default-essential-services): Use
host-name-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:31 +01:00
Maxim Cournoyer
dd31263eb4
services: gnome-desktop-service-type: Extend setuid-program-service-type.
* gnu/services/desktop.scm (gnome-setuid-programs): New variable.
(gnome-desktop-service-type): Extend setuid-program-service-type with it.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-02-25 14:46:55 -05:00
Maxim Cournoyer
abadd0f81f
services: desktop: Extract a new gnome-package procedure.
* gnu/services/desktop.scm (<gnome-desktop-configuration>): Rename gnome
package accessor to gnome-desktop-configuration-gnome, to avoid name conflict.
(gnome-packages): Change first argument from a config object to a the gnome
package used.  Rename second argument from package to name.  Extract core
logic into...
(gnome-package): ... this.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-desktop-service-type): Likewise.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-02-25 14:46:54 -05:00
Maxim Cournoyer
acbb112c1b
services: gnome-polkit-settings: Add spice-gtk.
* gnu/services/desktop.scm (gnome-polkit-settings): Add spice-gtk to the GNOME
packages providing polkit rules.
(package-direct-input-selector): Allow passing a list corresponding to the
dependency tree, so that non-propagated transitive inputs can be specified.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-02-25 14:46:54 -05:00
Ludovic Courtès
d00c2e9c2b
services: console-font, kmscon: Refer to native 'font-gnu-unifont' builds.
Fixes a regression introduce in 01334a61c7
that would prevent system cross-compilation (with "guix system image
--target=...") due to 'font-gnu-unifont' depending on 'perl-gd', which
currently cannot be cross-compiled.

* gnu/services/base.scm (%default-console-font, kmscon-service-type):
Refer to 'font-gnu-unifont' with 'ungexp-native'.
2023-02-25 00:00:33 +01:00
Ludovic Courtès
35e64a8793
services: hosts: Do not export '%host'.
This was not meant to be exported.

* gnu/services/base.scm (%host): Do not export.
* doc/guix.texi (Base Services): Remove mention.
2023-02-23 16:31:36 +01:00
Julien Lepiller
01334a61c7
gnu: Use unifont by default in TTYs.
It has even better language support than LatGrkCyr-8x16 and can show
fancy progress bars.

* gnu/services/base.scm (%default-console-font): Use unifont.
2023-02-19 10:09:10 +01:00
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
Efraim Flashner
4cf1acc7f3
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts:
	doc/guix.texi
	gnu/local.mk
	gnu/packages/admin.scm
	gnu/packages/base.scm
	gnu/packages/chromium.scm
	gnu/packages/compression.scm
	gnu/packages/databases.scm
	gnu/packages/diffoscope.scm
	gnu/packages/freedesktop.scm
	gnu/packages/gnome.scm
	gnu/packages/gnupg.scm
	gnu/packages/guile.scm
	gnu/packages/inkscape.scm
	gnu/packages/llvm.scm
	gnu/packages/openldap.scm
	gnu/packages/pciutils.scm
	gnu/packages/ruby.scm
	gnu/packages/samba.scm
	gnu/packages/sqlite.scm
	gnu/packages/statistics.scm
	gnu/packages/syndication.scm
	gnu/packages/tex.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
	gnu/packages/xml.scm
	guix/build-system/copy.scm
	guix/scripts/home.scm
2023-01-30 12:39:40 +02: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
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
Maxim Cournoyer
9b21cd2e9a
services: mcron: Add log? and log-format fields to mcron-configuration.
* gnu/services/mcron.scm (list-of-gexps?): New predicate.
(mcron-configuration): Rewrite using define-configuration.
[log?, log-format]: New fields.
(mcron-shepherd-services): Invoke mcron with the --log and --log-format
arguments when log? is #t,
(generate-doc): New procedure.
* doc/guix.texi (Scheduled Job Execution): Update doc.
(Mcron Home Service): Likewise.
* gnu/home/services/mcron.scm: Keep in sync with the above changes to
gnu/services/mcron.scm.
2022-11-15 16:26:16 -05:00
Maxim Cournoyer
543d971ed2
services: configuration: Re-order generated record fields.
This is so that the first field of the generated record matches the first one
declared, which makes 'define-configuration' record API compatible with
define-record-type* ones.

* gnu/services/configuration.scm (define-configuration-helper): Move the
%location field below the ones declared by the user.
* gnu/services/monitoring.scm (zabbix-front-end-config): Adjust match pattern
accordingly.
2022-11-15 16:26:16 -05:00
EuAndreh
5ef933efa4
services: vpn: Fix the profile wireguard package.
This is a follow-up of: fb35b7cedd.

* gnu/services/vpn.scm (wireguard-service-type): Add the wireguard package
from the configuration to the profile.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-11-13 14:03:54 +01:00
EuAndreh
fb35b7cedd
services: vpn: Add wireguard-tools to profile-service-type.
* gnu/services/vpn.scm (wireguard-service-type): Include the
"wireguard-tools" package as an extension to profile-service-type, so
that users that enable the wireguard service can interact with it via
the command-line without having to manually install wireguard-tools.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-11-12 18:40:16 +01:00
( via Guix-patches via
fdc9e1b27e
services: greetd: Add gexp compilers for sessions.
* gnu/home/services/base.scm (make-greetd-agreety-session-command,
greetd-wlgreet-sway-session-command, make-greetd-default-session-command):
Remove variables.
(greetd-agreety-session-compiler, greetd-wlgreet-sway-session-compiler): New
gexp compilers.
(greetd-terminal-configuration)[default-session-command]<sanitize>: Remove it.

Signed-off-by: Andrew Tropin <andrew@trop.in>
2022-11-09 11:23:10 +04:00
Leo Nikkilä
9ad311ec15
services: qemu-binfmt: Add x86_64 QEMU target.
* gnu/services/virtualization.scm (%x86_64): New variable.
(%qemu-platforms) Add it.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-07 20:51:25 +01:00
Alexey Abramov
73b3519568
services: gitolite: Add local-code configuration option.
* gnu/services/version-control.scm (gitolite-rc-file): Add local-code
field.
(gitolite-rc-file-compiler): Serialize the field.
* doc/guix.texi: Document it.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-07 20:29:14 +01:00
Marius Bakke
706f25f24d
services: ganeti: OS variants can be a directory.
* gnu/services/ganeti.scm (<ganeti-os>)[extension]: Default to #f.
(ganeti-os->directory): Only add extension if set.  Support a file-like object
for VARIANTS.
* doc/guix.texi (Virtualization Services): Document this change and add
example.  Update Ganeti URLs while at it.
2022-11-03 20:00:30 +01:00
Julien Lepiller
853b49c419
gnu: dovecot: Use standard mkdir-p/perms.
* gnu/services/mail.scm (%dovecot-activation): Use (gnu build utils).
2022-11-02 16:57:36 +01:00
Vagrant Cascadian
d3e982dccb
gnu: Fix typos.
* gnu/packages/emacs-xyz.scm (emacs-piem)[description]: Fix use of "This
  packages".
* gnu/packages/tex.scm (texlive-hardwrap)[description]: Fix spelling of
  "arbitrary".
* gnu/packages/cran.scm (r-shinymanager)[description]: Fix spelling of
  "authentication".
* gnu/packages/lisp-xyz.scm (sbcl-utils-kt)[description]: Fix spelling of
  "developed".
* gnu/packages/crates-io.scm (rust-fs-utils-1)[description]: Fix spelling of
  "filesystem".
  [synopsis]: Likewise.
* gnu/packages/haxe.scm (neko)[description]: Fix spelling of "functions".
* gnu/packages/animation.scm (swftools)[description]: Fix needless
  pluralization of "information".
* gnu/packages/lisp-xyz.scm (sbcl-slot-extra-options)[description]: Fix
  spelling of "inheritance".
* gnu/packages/emacs-xyz.scm (emacs-js-comint)[description]: Fix spelling of
  "interpreter".
* gnu/packages/coq.scm (coq-mathcomp-finmap)[description]: Fix spelling of
  "library".
* gnu/services/lightdm.scm (lightdm-configuration): Fix spelling of
  "mechanism".
* gnu/packages/emacs-xyz.scm (emacs-citar-org-roam)[synopsis]: Fix spelling of
  "package".
* gnu/packages/games.scm (freerct)[description]: Fix spelling of
  "responsibilities".
* gnu/packages/statistics.scm (r-mixedpower)[description]: Fix spelling of
  "separate".
* gnu/packages/accessibility.scm (espeakup)[description]: Fix spelling of
  "speech".
* gnu/packages/bioinformatics.scm (r-skitools)[synopsis]: Fix spelling of
  "utilities".
* gnu/packages/golang.scm (go-github-com-savsgio-gotils)[synopsis]: Fix
  spelling of "utilities".
  [description]: Likewise.
* gnu/system.scm (boot-file-system-service os): Fix spelling of "utilities".
2022-10-23 17:03:09 -07:00
Mathieu Othacehe
7ee77dc6df
services: wireguard: Add more configuration fields.
* gnu/services/vpn.scm (<wireguard-configuration>)[pre-up, post-up, pre-down,
post-down, table]: New fields.
(wireguard-configuration-file): Take them into account.
* doc/guix.texi (Wireguard): Update it.
2022-10-20 13:07:46 +02:00
EuAndreh via Guix-patches via
dbdc8f64e7
services: nginx: Improve reload action documentation.
* gnu/services/web.scm (nginx-shepherd-service): Be explicit about the
reload action not changing the configuration file, but instead
respawning worker processes.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-10-18 10:48:32 +01:00
EuAndreh via Guix-patches via
117b0a65c8
services: nginx: Use nginx-action over inline gexp.
* gnu/services/web.scm (nginx-shepherd-service): Use the simpler
"nginx-action" helper, for the same reload side-effect.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-10-18 10:48:14 +01:00
Julien Lepiller
82b0f3755d
guix: Fix typos.
These typos were found and reported through weblate.

* gnu/packages/audio.scm (wildmidi)[description]: Fix typo.
* gnu/packages/games.scm (cgoban)[description]: Fix typo.
* gnu/services/version-control.scm (gitolite-service-type)[description]:
  Fix typo.
* gnu/installer/newt/substitutes.scm (run-substitutes-page): Remove full
  stop at end of title.
* gnu/machine/ssh.scm (machine-ssh-configuration-system): Move
  punctuation outside of quotes.
* guix/scripts/home.scm (process-action): Remove trailing space before
  newline.
* guix/scripts/system.scm (show-help): Fix typo.
* guix/scripts/environment.scm (with-store/maybe): Fix typo.
2022-10-17 07:29:09 +02:00
EuAndreh
a9268695e0
services: nginx: Add reload action.
In a new "reload" shepherd-action, send a SIGHUP to the NGINX master process,
so that it can re-read the configuration file and start new worker processes.

* gnu/services/web.scm (nginx-shepherd-service): Add the "reload"
shepherd-action.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-10-13 12:27:35 +01:00
Maxim Cournoyer
683558e2ed
services: slim-service-type: Do not extend profile with xterm.
This is not done for gdm-service-type, so do not do it here either, for
consistency.  Perhaps that change had been motivated by the fact that using
ratpoison without a default terminal makes for a poor user experience (one
cannot even view the help screen without a terminal); this was fixed with the
preceding commit.

* gnu/services/xorg.scm (slim-service-type)
[profile-service-type]: Remove extension.
2022-10-11 11:29:03 +00:00
(
ba6ea435e2
gnu: base: Add greetd-wlgreet-sway-session.
* gnu/services/base.scm (greetd-wlgreet-session): New data type.
(greetd-wlgreet-sway-session): Likewise.
* doc/guix.texi ("Base Services")[greetd-service-type]: Document
  them.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-10-11 11:43:01 +01:00
Christopher Baines
e83b9fe44e
services: guix: Include max-allocated-builds gbc agent option.
* gnu/services/guix.scm (guix-build-coordinator-agent-configuration-max-allocated-builds):
New procedure.
(guix-build-coordinator-agent-shepherd-services): Use max-allocated-builds.
* doc/guix.texi (Guix Build Coordinator): Document this new field.
2022-10-11 11:41:15 +01:00
Maxim Cournoyer
00e8430500
Revert "Revert "services: Add xvnc-service-type.""
This reverts commit 0c49661600.  The fix appears
in the subsequent commit, for clarity.
2022-10-07 15:07:48 -04:00
Maxim Cournoyer
0c49661600
Revert "services: Add xvnc-service-type."
This reverts commit 1c528a95cb.  This broke
'guix pull', for (yet) unknown reasons.
2022-10-07 12:53:22 -04:00
Maxim Cournoyer
1c528a95cb
services: Add xvnc-service-type.
* gnu/services/vnc.scm: New file.
* gnu/tests/vnc.scm: Likewise.
* gnu/local.mk: Register them.
2022-10-07 10:11:13 -04:00
Maxim Cournoyer
aad4e4fc6b
services: xorg: Add auto-suspend? field to <gdm-configuration>.
* gnu/services/xorg.scm (<gdm-configuration>)
<auto-suspend?>: New field.
(gdm-dconf-profiles): New variable.
* gnu/services/xorg.scm (gdm-shepherd-service)
<environment-variables> [!auto-suspend?]: Specify DCONF_PROFILE.
(gdm-service-type): Extend DCONF-SERVICE-TYPE.
* doc/guix.texi (X Window): Document the new field.
2022-10-07 10:11:13 -04:00
Maxim Cournoyer
7b896a26b8
services: Add dconf-service-type.
This allows the dconf profile directive "system-db:" to look up profiles by
name from under /etc/dconf/db/.

* gnu/services/xorg.scm (dconf-keyfile, dconf-profile): New procedures.
(dconf-profiles?): New predicate.
(dconf-configuration): New procedure.
(dconf-profile->profile-file): Likewise.
(dconf-profile->db-keyfile): Likewise.
(dconf-profile->db-keyfile-dir): Likewise.
(dconf-profile->db): Likewise.
(dconf-profile->files): Likewise.
(dconf-service-type): New service type.
2022-10-07 10:11:12 -04:00
Maxim Cournoyer
1936668f5b
services: gdm: Add a configuration field to enable XDMCP.
* gnu/services/xorg.scm (<gdm-configuration>)[xdmcp?]: New field.
* gnu/services/xorg.scm (gdm-configuration-file): Use it.  Use (ice-9 format)
to serialize boolean.
(gdm-polkit-rules): New variable.
(gdm-service-type): Use it to extend polkit.
* doc/guix.texi (X Window): Document it.
2022-10-07 10:11:11 -04:00
Alexey Abramov
40ad967322
services: dhcp-client: Implement and use a configuration record.
* gnu/services/networking.scm (dhcp-client-configuration): New record
configuration.
(dhcp-client-shepherd-service): Implement a shepher service. Provide a
deprication message for legacy configurations.
(dhcp-client-service-type): Use dhcp-client-shepherd-service.
* doc/guix.texi (Networking Setup): Update.
* po/guix/POTFILES.in: Add 'gnu/services/networking.scm'.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-10-06 00:11:18 +02:00
Ludovic Courtès
f83622f17d
services: anonip: Bail out when the input is not a FIFO.
* gnu/services/web.scm (anonip-shepherd-service)[start]: Accept zero
arguments.  Define 'spawn'.  Print a message and return #f when #$INPUT
does not denote a FIFO.
2022-10-04 18:15:35 +02:00
Mája Tomášek
1bf18818c6
services: certbot: Create "live" directory during activation.
When trying to run certbot, the mcron command fails, as
/etc/letsencrypt/live is missing.  This patch adds it into the certbot
activation service.

* gnu/services/certbot.scm (certbot-activation): Make /etc/letsencrypt/live.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-29 22:59:48 +02:00
Ludovic Courtès
168a7933c0
services: shepherd: Leave the finalization thread in peace.
This gets rid of that (in)famous at boot time:

  error in finalization thread: Success

This was caused by the file-descriptor closing loop, which would clause
the finalization pipe, leading the finalization thread to (erroneously)
error out.

Thanks to Josselin Poiret for locating the problem!

* gnu/services/shepherd.scm (shepherd-boot-gexp): In 'loop', replace
'close-fdes' with a pair of 'fcntl' calls to add FD_CLOEXEC.
2022-09-29 22:56:56 +02:00
Brice Waegeneire
45eac6cdf5
services: Add file system utilities to profile.
* gnu/services/base.scm (file-system-type->utilities)
(file-system-utilities): New procedures.
(file-system-service-type): Extend 'profile-service-type' with
'file-system-utilities'.
* gnu/system.scm (boot-file-system-service): New procedure.
(operating-system-default-essential-services): Use it.
(%base-packages): Remove 'e2fsprogs'.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-09-28 19:45:38 -04:00
Maxim Cournoyer
2703b16005
services: samba: Remove unused variables and modules.
* gnu/services/samba.scm (%smb-conf): Delete unused variable.
2022-09-28 09:57:30 -04:00
Maxim Cournoyer
990a4822f1
Merge branch 'staging' into core-updates
Conflicts resolved in:
	gnu/local.mk
	gnu/packages/cran.scm
	gnu/packages/gnome.scm
	gnu/packages/gtk.scm
	gnu/packages/icu4c.scm
	gnu/packages/java.scm
	gnu/packages/machine-learning.scm
	gnu/packages/tex.scm
2022-09-27 15:59:30 -04:00
Simen Endsjø
75e7c09461
services: nginx: Don't emit empty fields
An empty root or index field is an error in nginx.

* gnu/services/web.scm (emit-nginx-server-config): Don't emit root or
index fields when they are empty

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26 23:29:38 +02:00
Simon Streit
e1ce100915
services: Add wsdd service.
* doc/guix.texi: Add documentation for wsdd service.
* gnu/services/samba.scm (<wsdd-configuration>): New record.
(wsdd-service-type): New variable.
(wsdd-shepherd-services): New procedure.
* gnu/tests/samba.scm (%wsdd-os): Add variable.
(run-wsdd-test): New procedure.
(%test-wsdd): New variable.

Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
2022-09-24 09:41:24 +02:00
Simon Streit
d68721c55a
services: Add samba service.
* gnu/services/samba.scm: New file.
* gnu/tests/samba.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add them.
* po/guix/POTFILES.in Add 'gnu/services/samba.scm'.
* doc/guix.texi: Document it.

Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
2022-09-24 09:38:57 +02:00
Maxim Cournoyer
effdc6c83e
services: jami-service-type: Streamline stop slot.
* gnu/services/telephony.scm (jami-shepherd-services)
[stop]: Use make-kill-destructor with SIGKILL.  Add comment.
2022-09-23 23:56:16 -04:00
Maxim Cournoyer
46fee48d5c
services: configuration: Fix typo.
* gnu/services/configuration.scm (interpose): Fix typo in doc.
(text-config?): Add a newline following definition.
2022-09-23 00:50:12 -04:00
Marius Bakke
80c76f5d8e
Merge branch 'staging' into core-updates 2022-09-18 16:30:21 +02:00
Maxim Cournoyer
d7e56aebec
services: desktop: Mount /var/lib/gdm on a tmpfs file system.
Fixes <https://issues.guix.gnu.org/44944>.

* gnu/services/xorg.scm (%gdm-activation): Delete variable.
(gdm-service-type): De-register it.
* gnu/services/desktop.scm (%gdm-file-system): New variable.
(gdm-file-system-service): Likewise.
(desktop-services-for-system): Use it.
2022-09-16 16:27:08 -04:00
Marius Bakke
7e0f2728a4
Merge branch 'staging' into core-updates 2022-09-16 19:11:43 +02:00
Maxim Cournoyer
106660e3ff
services: elogind-configuration-file: Do not serialize unspecified items.
This a followup to 59ee837d8b, which changed the
default value of the HandleLidSwitchExternalPower to the empty string.
Unfortunately this causes elogind to print a warning (although it otherwise
works as intended).  This change fixes that.

* gnu/services/desktop.scm (elogind-configuration-file)<handle-action>: Let
the unspecified value go through.
<ini-file-clause>: When an unspecified file is encountered, do not produce any
text to serialize.
2022-09-16 12:02:24 -04:00
Maxim Cournoyer
4920f6e634
Merge branch 'staging' into core-updates
Conflicts resolved in:
	gnu/local.mk
	gnu/packages/cmake.scm
	gnu/packages/glib.scm
	gnu/packages/gnome.scm
	gnu/packages/gtk.scm
	gnu/packages/sdl.scm

pango-next, vala-next and librsvg-bootstrap were removed in the process.
2022-09-15 11:43:21 -04:00
muradm
29d52a56f2
gnu: fail2ban-service-type: Improve extra-content fields.
* gnu/services/security.scm
(fail2ban-jail-configuration)[extra-content]: Change to text-config.
(fail2ban-configuration)[extra-content]: Change to text-config.
* gnu/doc/guix.texi: Update type of extra-content fields.

Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-09-14 11:29:11 -04:00
Ludovic Courtès
66fdaf3677
services: shepherd: Install O_CLOEXEC variant of 'call-with-input-file' & co.
Fixes a bug introduced with the Shepherd 0.9.2 upgrade in commit
1ba0e38267 whereby files opened by, say,
the 'start' method of 'urandom-seed', could leak into the execution
environment of some other service--e.g., 'term-tty4'.

* gnu/services/shepherd.scm (shepherd-configuration-file)[config]:
Override 'call-with-input-file' and 'call-with-output-file'.
2022-09-13 00:31:04 +02:00
Ludovic Courtès
32583c8c20
services: secret-service: Inherit from the original 'guix-configuration'.
Reported by zamfofex.

Regression introduced in 2bac6ea177.

* gnu/services/virtualization.scm (secret-service-operating-system):
Add 'inherit' keyword for 'guix-configuration'.
2022-09-13 00:31:04 +02:00
Mathieu Othacehe
22bfc42fab
services: web: Fix long lines.
* gnu/services/web.scm: Remove a trailing space and wrap long line. No
functional change.
2022-09-11 15:49:30 +02:00
Ludovic Courtès
081bb6a7bd
services: shepherd: Open /dev/null as O_CLOEXEC.
Failing to do that, that file descriptor could be inherited by child
processes as of Shepherd 0.9.2.

* gnu/services/shepherd.scm (shepherd-configuration-file): Open
/dev/null as O_CLOEXEC.
2022-09-11 00:16:57 +02:00
Marius Bakke
9ef33dce94
Merge branch 'staging' into core-updates 2022-09-09 23:04:13 +02:00
Oleg Pykhalov
8eeadc8cb8
services: libvirt: Fix listen TCP.
* gnu/services/virtualization.scm (libvirt-shepherd-service): Add '--listen'
argument if 'listen-tcp?' is true.
2022-09-09 23:50:55 +03:00
Marius Bakke
884548b476
Merge branch 'staging' into core-updates 2022-09-08 21:12:52 +02:00
Hilton Chain
685dd8fb13
services: agetty-service-type: Add missing dash.
* gnu/services/base.scm (<agetty-configuration>): Add missing dash for
no-hostname? configuration.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-08 16:22:23 +02:00
Ludovic Courtès
8c5065c6d1
services: nginx: Add 'shepherd-requirement' configuration field.
* gnu/services/web.scm (<nginx-configuration>)[shepherd-requirement]:
New field.
(nginx-shepherd-service): Honor it.
* doc/guix.texi (Web Services): Document it.
2022-09-06 16:58:12 +02:00
Ludovic Courtès
eedf71f948
services: upower: Default to a percentage-based policy.
This is the documented default of UPower 0.99.15 (the actual default
appears to be #f though).

* gnu/services/desktop.scm (<upower-configuration>)
[use-percentage-for-policy?]: Default to #t.
* doc/guix.texi (Desktop Services): Adjust accordingly.  Explain the
tradeoff.
2022-09-04 23:10:10 +02:00
Ludovic Courtès
4765242540
services: upower: Update default percentage values.
These values are those used by default by UPower 0.99.15.

* gnu/services/desktop.scm (<upower-configuration>)[percentage-low]
[percentage-critical]: Increase.
* doc/guix.texi (Desktop Services): Update accordingly.
2022-09-04 23:10:09 +02:00
Marius Bakke
58863b93b0
Merge branch 'staging' into core-updates 2022-09-01 23:26:57 +02:00
muradm
fa2d651475
gnu: fail2ban-service-type: Fix documentation typos.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-09-01 08:58:16 -04:00
muradm
7686dd9676
gnu: fail2ban-service-type: Improve jail configuration serialization.
* gnu/services/security.scm (fail2ban-jail-configuration)
[name]: Should use empty-serializer.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-09-01 08:58:16 -04:00
muradm
80d9edb69d
gnu: fail2ban-service-type: Fix field name serialization.
* gnu/services/security.scm: Wrong condition in string-filter
function in fail2ban-jail-configuration-serialize-field-name.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-09-01 08:58:15 -04:00
Marius Bakke
59c136ef61
Merge branch 'staging' into core-updates 2022-08-30 20:18:55 +02:00
David Thompson
9b5b1dde32
services: gitolite: Relax permissions on service user home directory.
Fixes https://issues.guix.gnu.org/56444

* gnu/services/version-control.scm (gitolite-activation): Modify permissions
  on home directory so that git group has read access.

Reported-by: Evgeny Pisemsky <evgeny@pisemsky.com>

Experienced by David Thompson for years, wondering what was wrong. Thanks for
finding the root cause, Evgeny! :)
2022-08-30 12:37:19 -04:00
Maxim Cournoyer
0ea62e84a7
services: Add lightdm-service-type.
* gnu/services/lightdm.scm: New service.
* tests/services/lightdm.scm: Test it.
* doc/guix.texi (X Window): Document it.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it.

Co-authored-by: L p R n d n <guix@lprndn.info>
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
2022-08-28 22:28:47 -04:00
muradm
3c2d2b4538
gnu: security: Add fail2ban-service-type.
* gnu/services/security.scm: New module.
* gnu/tests/security.scm: New module.
* gnu/local.mk: Add new security module and tests.
* doc/guix.text: Add fail2ban-service-type documentation.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-08-28 21:46:30 -04:00
Maxim Cournoyer
e8f4e18085
gnu: polkit-mozjs: Rename to polkit and remove obsolete polkit-duktape.
Polkit 121 now uses duktape as the default JavaScript engine.

* gnu/packages/polkit.scm (polkit-mozjs): Rename to...
(polkit): ... this.
[import-modules, modules]: New arguments.
[configure-flags]: Drop non-default "js_engine=mozjs" option.
[phases]{adjust-install-time-etc-directory, patch-bash}: New phases.
{check}: New override.
[inputs]: Replace mozjs-91 with duktape.
[native-inputs]: Add python, python-dbusmock and tini.
(polkit-duktape): Delete variable.
(polkit-for-system): Delete procedure.
(polkit) Delete syntax.
* gnu/services/dbus.scm (%default-polkit): Delete variable.
(<polkit-configuration>): Adjust accordingly.
2022-08-28 21:07:47 -04:00
Marius Bakke
ad384816fe
Merge branch 'staging' into core-updates 2022-08-27 17:10:55 +02:00
muradm
cac3914dfc
gnu: greetd-service-type: Add supplementary groups to greeter.
* gnu/services/base.scm (<greetd-configuration>)
[greeter-supplementary-groups]: New field.
(%greetd-accounts): Rename to...
(greetd-accounts): ... this.  Convert to a function that takes a config
argument.  Use greeter-supplementary-groups.
(greetd-service-type): Adjust accordingly.
* gnu/tests/desktop.scm (%minimal-services): Add test for
greeter-supplementary-groups.
* doc/guix.texi ("Base Services")[greetd-service-type]: Document
greeter-supplementary-groups.
2022-08-26 18:50:33 +02:00
muradm
d1815a68ea
gnu: seatd-service-type: Use seat group.
* gnu/services/desktop.scm (seatd-group-sanitizer): New variable.
(<seatd-configuration>)[user]: Removed field.
[group]: Changed to "seat".  Sanitize via seatd-group-sanitizer.
(seatd-accounts): New variable.
(seatd-environment): Adjust to <seatd-configuration> ABI.
(seatd-service-type)[extensions]: Add account-service-type with seatd-accounts.
* gnu/tests/desktop.scm (run-minimal-desktop-test): Check for correct
ownership of $SEATD_SOCK.
* doc/guix.texi ("Desktop Services")[seatd-service-type]: Mention that users
may need to become members of the "seat" group.
Update default value for group field.
Add explanation on seatd.sock file.
Remove dropped user field.
2022-08-26 18:48:37 +02:00
Attila Lendvai
6fb9759ef3
services: configuration: Change the value of the unset marker.
The new value of %unset-value sticks out more when something goes wrong, and
is also more unique; i.e. easier to search for.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-08-25 00:10:42 -04:00
Attila Lendvai
ee08277a70
services: Use the new maybe/unset API.
* gnu/home/services/ssh.scm (serialize-address-family): Use the public API of
the maybe infrastructure.
* gnu/services/file-sharing.scm (serialize-maybe-string): Use maybe-value.
(serialize-maybe-file-object): Use maybe-value-set?.
* gnu/services/getmail.scm (getmail-retriever-configuration): Don't use
internals in unset field declarations.
(getmail-destination-configuration): Ditto.
* gnu/services/messaging.scm (raw-content?): Use maybe-value-set?.
(prosody-configuration): Use %unset-value.
* gnu/services/telephony.scm (jami-shepherd-services): Use maybe-value-set?.
(archive-name->username): Use maybe-value-set?.
* tests/services/configuration.scm ("maybe type, no default"): Use
%unset-value.

Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-08-25 00:10:32 -04:00
Attila Lendvai
cc32cd41f7
services: configuration: Add maybe-value exported procedure.
* gnu/services/configuration.scm (maybe-value): New procedure.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-08-24 23:27:54 -04:00
Attila Lendvai
147f8f19f8
services: configuration: Add %unset-value exported variable.
* gnu/services/configuration.scm (%unset-value): New variable.
(normalize-field-type+def): Use it.
(maybe-value-unset?): Use it.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-08-24 23:27:53 -04:00
Maxim Cournoyer
1c803e63f9
services: configuration: Add a 'maybe-value-set?' procedure.
* gnu/services/configuration.scm (maybe-value-set?): New procedure.
* doc/guix.texi (Complex Configurations): Document it.  Remove comment showing
usage of 'maybe-string' with a default value, which doesn't make sense.

Co-authored-by: Attila Lendvai <attila@lendvai.name>
2022-08-24 22:34:45 -04:00
Marius Bakke
77eb3008e3
Merge branch 'staging' into core-updates 2022-08-11 23:36:10 +02:00
Maxim Cournoyer
59ee837d8b
services: elogind: Fix default behavior for lid close.
Fixes <https://issues.guix.gnu.org/57052>, which was a behavior change
introduced inadvertently in 4c698cd512.

* gnu/services/desktop.scm (<elogind-configuration>)
[handle-lid-switch-external-power]: Default to *unspecified*, which serializes
to nothing.  This matches upstream behavior, meaning that even when plugged to
a power cord, a laptop will suspend when the lid is closed.
* doc/guix.texi (Desktop Services): Update doc.

Reported-by: Cairn <cairn@pm.me>
2022-08-10 00:33:30 -04:00
Timotej Lazar
ee199cd3ba
services: qemu-guest-agent: Fix arguments to qemu-ga.
Fix the check for empty device path. Do not use --daemonize, since that is
handled by make-forkexec-constructor. Drop the --pidfile option which is
unused without --daemonize.

* gnu/services/virtualization.scm (qemu-guest-agent-shepherd-service): Modify
command arguments.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-09 17:15:40 +02:00
Maxim Cournoyer
a2b89a3319
services: configuration: Step back from *unspecified*.
Fixes <https://issues.guix.gnu.org/56799>.

This partially reverts 8cb1a49a39.

Rationale: *unspecified* cannot be serialized thus used as a G-Expression
input, which is problematic/inconvenient when using deeply nested records.  As
an example, jami-service-type was broken when using partially defined
<jami-account> records.

* gnu/services/configuration.scm (define-maybe-helper): Check against the
'unset symbol.
(normalize-field-type+def): Adjust value to 'unset.
(define-configuration-helper): Use 'unset as the default value thunk.
* gnu/services/file-sharing.scm (serialize-maybe-string): Check against the
'unset symbol.
(serialize-maybe-file-object): Likewise.
* gnu/services/messaging.scm (define-all-configurations): Use 'unset as
value.
(raw-content?): Check against 'unset symbol.
(prosody-configuration)[http-max-content-size]: Default to 'unset.
[http-external-url]: Likewise.
[mod-muc]: Likewise.
[raw-content]: Likewise.
* gnu/services/networking.scm (opendht-configuration): Adjust documentation.
* gnu/services/telephony.scm (jami-shepherd-services): Replace *undefined*
with the 'unset symbol.
* tests/services/configuration.scm ("maybe type, no default"): Check against
the 'unset symbol.
* doc/guix.texi: Regenerate the opendht-configuration,
openvpn-client-configuration and openvpn-server-configuration documentation.
2022-08-01 12:49:35 -04:00
Maya
dd3cf14402
services: opensmtpd: Make commands setgid to "smtpq" by default.
This is a patch that fixes "<executable name>: this program must be setgid smtpq".

* gnu/services/mail.scm (<opensmtpd-configuration>)[setgid-commands?]: New field.
(opensmtpd-set-gids): New procedure.
(opensmtpd-service-type)[extensions]: Add SETUID-PROGRAM-SERVICE-TYPE extension.
* doc/guix.texi (Mail Services): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-08-01 14:08:08 +02:00
Ludovic Courtès
7d0ebc467f
services: rottlog: More convenient default options for <log-rotation>.
* gnu/services/admin.scm (%default-log-rotation-options): New variable.
(%default-rotations): Use it.
* gnu/services/cuirass.scm (cuirass-log-rotations): Likewise.
* doc/guix.texi (Log Rotation): Adjust accordingly.
2022-08-01 00:02:04 +02:00
Ludovic Courtès
e5a6900baf
services: rottlog: Keep important /var/log files for 16 weeks.
The default "rotate" value is 1 as of rottlog 0.72.2, meaning that only
one rotated file would be kept in addition to the active file.

* gnu/services/admin.scm (%default-rotations): Add "rotate" option for
%ROTATED-FILES.
2022-08-01 00:02:04 +02:00
Ludovic Courtès
bfe3fdbc75
services: tor: Do not write to /var/log/tor.log.
The service uses syslog and additionally shepherd 0.9 captures its
stdout/stderr, so there's no point in passing #:log-file.

* gnu/services/networking.scm (tor-shepherd-service): Remove #:log-file
argument to 'make-forkexec-constructor'.
(%tor-log-rotation): Remove.
(tor-service-type): Remove ROTTLOG-SERVICE-TYPE extension.
2022-08-01 00:02:03 +02:00
Marius Bakke
9044b086dd
Merge branch 'staging' into core-updates 2022-07-22 01:09:14 +02:00
Ludovic Courtès
fb868cd779
services: tor: Switch to 'least-authority-wrapper'.
* gnu/services/networking.scm (tor-configuration->torrc): Remove "User"
and "PidFile".
(tor-shepherd-service): Use 'least-authority-wrapper' and
'make-forkexec-constructor' instead of
'make-forkexec-constructor/container'.
2022-07-19 18:54:42 +02:00
Timotej Lazar
6a2a8ca1f5
gnu: tests: Fix guix-data-service test.
Since revision 32, guix-data-service starts immediately but returns an HTTP
error code until initialization is complete. Adjust the test accordingly, and
remove the increased startup time limit.

* gnu/services/guix.scm (guix-data-service): Use default #:pid-file-timeout.
* gnu/tests/guix.scm (guix-data-service): Retry the http-get test several
times to give the service time to initialize.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-07-15 09:38:42 +01:00
Oleg Pykhalov
b33e1a183f
services: docker: Fix race condition.
Fixes <https://issues.guix.gnu.org/38432>.

* gnu/packages/patches/containerd-create-pid-file.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add this.
* gnu/packages/docker.scm (containerd)[source]: Add this patch.
* gnu/services/docker.scm
(containerd-shepherd-service): Add #:pid-file and #:pid-file-timeout.
* gnu/services/docker.scm (docker-shepherd-service): Add --containerd flag.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-07-13 21:36:41 -04:00
Christopher Baines
e069de452a
services: guix-build-coordinator: Fix passing parallel-hooks.
The previous approach didn't support a simple alist.

* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Fix
passing parallel-hooks in to the start gexp.
2022-07-03 20:38:09 +01:00
Ricardo Wurmus
cba98b58bf
services: Add anonip-service-type.
* gnu/services/web.scm (anonip-configuration): New record type.
(anonip-configuration?, anonip-configuration-anonip,
anonip-configuration-input, anonip-configuration-output,
anonip-configuration-skip-private?, anonip-configuration-column,
anonip-configuration-replacement, anonip-configuration-ipv4mask,
anonip-configuration-ipv6mask, anonip-configuration-increment,
anonip-configuration-delimiter, anonip-configuration-regex): New procedures.
(anonip-service-type): New service type.
* doc/guix.texi (Log Rotation): Add subheading for Anonip Service.
2022-07-03 14:12:32 +02:00
Ludovic Courtès
bf7e07d299
services: openssh: Listen on IPv6 only when IPv6 is supported.
Fixes <https://issues.guix.gnu.org/56327>.
Reported by André Batista <nandre@riseup.net>.

* gnu/services/ssh.scm (openssh-shepherd-service)[ipv6-support?]: New
variable.
Use it in 'start' method.
2022-07-01 23:29:16 +02:00
Ludovic Courtès
0483c71cc5
services: root-file-system: Cleanly unmount upon shutdown.
Fixes <https://issues.guix.gnu.org/56209>.
Reported by angry rectangle <angryrectangle@cock.li>.

* gnu/packages/admin.scm (shepherd-0.9)[modules, snippet]: New fields.
* gnu/services/base.scm (%root-file-system-shepherd-service): In 'stop'
method, remove 'call-with-blocked-asyncs'.  When 'mount' throws to
'system-error, call (@ (fibers) sleep) and try again.
* gnu/tests/base.scm (run-root-unmount-test): New procedure.
(%test-root-unmount): New variable.
2022-07-01 12:10:28 +02:00
Christopher Baines
b5c6062bce
services: nginx: Add support for extra content in upstream blocks.
I'm looking at this as I'd like to use the keepalive functionality.

* gnu/services/web.scm (nginx-upstream-configuration-extra-content): New
procedure.
(emit-nginx-upstream-config): Include the extra-content if applicable.
* doc/guix.texi (NGINX): Document this.
2022-07-01 09:45:28 +01:00
Christopher Baines
09aeabb9d3
services: guix: Support guix-build-coordinator parallel hooks.
* gnu/services/guix.scm (guix-build-coordinator-configuration-parallel-hooks):
New procedure.
(make-guix-build-coordinator-start-script): Accept and use #:parallel-hooks.
(guix-build-coordinator-shepherd-services): Pass parallel-hooks to
make-guix-build-coordinator-start-script.
* doc/guix.texi (Guix Build Coordinator): Document this new field.
2022-07-01 09:45:28 +01:00
Lars-Dominik Braun
d921516f50
services: greetd: Remove unnecessary user groups.
* gnu/services/base.scm (%greetd-accounts): Remove supplementary groups
users, tty, input, audio. Create special user group “greeter”.
2022-06-30 09:20:37 +02:00
Marius Bakke
2a7648774f
Merge branch 'master' into core-updates 2022-06-27 19:23:48 +02:00