me
/
guix
Archived
1
0
Fork 0
Commit Graph

1905 Commits (65b3e55d15c998aa8cbb21bffb489c37be6a43b1)

Author SHA1 Message Date
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