Commit graph

1934 commits

Author SHA1 Message Date
Felix Lechner
48d06aee7b
services: Use more 'file-append'.
* gnu/services/authentication.scm (pam-ldap-pam-service): Use
'file-append' instead of #~(string-append ...).
* gnu/services/base.scm (greetd-pam-service): Likewise.
* gnu/services/kerberos.scm (pam-krb5-pam-service): Likewise.
* gnu/services/pam-mount.scm (pam-mount-pam-service): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-15 23:30:44 +02:00
Felix Lechner
20c51c1d2c
services: pam-limits: Keep 'limits.conf' in the store.
* gnu/services/base.scm (pam-limits-service-type)[pam-extension]: Wrap
into a 'lambda' that takes 'limits-file'.  Pass that in the <pam-entry>
'arguments' field.  Define 'make-limits-file' and use it.
Remove ETC-SERVICE-TYPE extension.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-15 23:30:43 +02:00
宋文武
770f3f587d
Merge remote-tracking branch 'origin/master' into kde-updates 2023-08-11 20:19:52 +08:00
terramorpha
56fddefc6d
services: syncthing: Use the new command line syntax.
* gnu/services/syncthing.scm (syncthing-shepherd-service): Use the new command line syntax.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-11 00:50:48 +02:00
Miguel Moreno
71aba798d3
services: postgresql: Add more role fields.
* gnu/services/databases.scm (postgresql-role): Add more role fields.
(postgresql-create-roles): Honor it.
* doc/guix.texi (Database Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-11 00:50:48 +02:00
Hartmut Goebel
8055649428
services: Add Plasma desktop service.
* gnu/services/desktop.scm (kde-desktop-service-type): New variable.
(<kde-desktop-configuration>): New record type.
(kde-desktop-configuration): New procedure.
* doc/guix.texi (Desktop Services): Document it.

Co-authored-by: Zheng Junjie <873216071@qq.com>
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-08-03 17:38:03 +08:00
Zheng Junjie
7e056197d7
services: sddm: Set some environment variables for the breeze theme.
* gnu/services/sddm.scm (sddm-service-type): Pass #:environment-variables to
make-forkexec-constructor.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-08-02 22:27:43 +08:00
Brian Cully
8a88b8b0b5
services: Add pam-mount-volume-service-type.
The `pam-mount-volumes-service-type' adds additional volumes to the
pam-mount-service-type in addition to any that are already specified in
`pam-mount-rules'.

* doc/guix.texi (PAM Mount Volume Service): add documentation for
`pam-mount-service-type'.
* gnu/services/pam-mount.scm: new file.
* Makefile.am: add pam-mount tests
* tests/services/pam-mount.scm: new tests

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-10 09:26:08 +02:00
Sam Lockart
969cea6836
file-systems: Use cgroups v2.
cgroup v2 is the next generation of the control groups API.  This patch
replaces the cgroup v1 file systems with the unified cgroup v2 file
system.

cgroup v2 allows for things like containerd/podman to run rootless
containers and opens guix system up to running things like Kubernetes.

Thanks to Hilton Chain <hako@ultrarare.space> for suggesting the Docker
service change.

* gnu/system/file-systems.scm (%control-groups): Change to a single
"cgroup2" mount point.
* gnu/services/docker.scm (docker-shepherd-service): Trim 'requirement'
field accordingly.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-08-08 18:01:55 +02:00
Ludovic Courtès
b3a2b3e723
services: Add 'package-database' service.
* gnu/services/admin.scm (%default-package-database-update-schedule):
New variable.
(<package-database-configuration>): New record type.
(package-database-mcron-jobs): New procedure.
(package-database-service-type): New variable.
* doc/guix.texi (File Search Services): Document it.
2023-08-07 15:11:45 +02:00
Ludovic Courtès
e63c87020d
services: Add 'file-database' service.
* gnu/services/admin.scm (%default-file-database-update-schedule)
(%default-file-database-excluded-directories): New variables.
(<file-database-configuration>): New record type.
(file-database-mcron-jobs): New procedure.
(file-database-service-type): New variable.
* doc/guix.texi (File Search Services): New node.
2023-08-07 15:11:44 +02:00
Maxim Cournoyer
c7e45139fa
Revert "services: mpd: Add an 'update' action to trigger a database update."
This reverts commit e1070ee160.  Rationale: this
only works with the default 'endpoints'.  The 'auto-update?' option should be
sufficient to trigger a database update automatically anyway.
2023-07-26 12:04:37 -04:00
Maxim Cournoyer
776317e707
services: mpd: Provision a default cache directory and set HOME.
Relates to <https://issues.guix.gnu.org/63082>.

* gnu/services/audio.scm (mpd-shepherd-service): Create a default .cache
directory.  Use mkdir-p/perms and refactor loop.  Set the HOME environment
variables.
2023-07-26 10:40:16 -04:00
Maxim Cournoyer
07bb69d52c
services: mpd: Auto-detect mpd-output mixer type by default.
Relates to <https://issues.guix.gnu.org/63082>.

* gnu/services/audio.scm (mpd-output) [mixer-type]: Change default value from
"none" to unspecified.
* doc/guix.texi (Audio Services): Regenerate doc.
2023-07-26 10:40:16 -04:00
Maxim Cournoyer
f16c7188f4
services: Avoid 'delete' overrides warning in audio module.
* gnu/services/audio.scm: Hide 'delete' on (gnu services) import.
2023-07-26 10:40:16 -04:00
Maxim Cournoyer
0db2fa1ac0
services: mpd: Do not rotate logs when using syslog.
* gnu/services/audio.scm (mpd-log-rotation): Conditionlize based on the value
of LOG-FILE.
2023-07-26 10:40:16 -04:00
Maxim Cournoyer
131746885c
services: mpd: Log to syslog by default.
Rationale: the tristate value was awkward to deal with, the default log file
name was odd (/var/log/mpd/log) and it required special attention to create
the 'mpd' parent directory as root and chowning it to the MPD user.  It also
didn't match the default behavior of MPD, which is to log to systemd or syslog
unless a log file is specified.

* gnu/services/audio.scm (mpd-log-file-sanitizer): New procedure.
(mpd-configuration) [log-file]: Remove default maybe value.  Add sanitizer.
(mpd-shepherd-service): Validate the log file parent directory exists and has
the right permissions.  Conditionally add syslogd to requirements.
(mympd-log-to-sanitizer): New procedure.
(mympd-configuration) [log-to]: Change type to maybe-string.  Update doc and
add sanitizer.
(mympd-shepherd-service) [requirement]: Fix to use syslogd.  Adjust
accordingly.
[start] Adjust accordingly.
(mympd-log-rotation): Check log-to via maybe-value-set?.
* doc/guix.texi (Audio Services): Update doc.
2023-07-26 10:40:15 -04:00
Maxim Cournoyer
a5d611c19b
services: mpd; Refactor start slot directory initialization.
* gnu/services/audio.scm (mpd-shepherd-service): Standardize the way the log
file parent and other directories are initialized in the start slot.
(mympd-shepherd-service): Likewise.
2023-07-26 10:40:15 -04:00
Maxim Cournoyer
98a46c9da6
services: mpd: List log-level in decreasing verbosity order in doc.
* gnu/services/audio.scm (mpd-configuration) [log-level]: List log-level in
decreasing verbosity order in doc.
* doc/guix.texi (Audio Services): Update doc.
2023-07-26 10:40:15 -04:00
Christopher Baines
a8b4ab61f3
services: guix-data-service: Unlink the two shepherd services.
So that they can be restarted in dependently.

* gnu/services/guix.scm (guix-data-service-shepherd-services): Don't require
the main service from the jobs service.
2023-07-26 10:31:58 +01:00
Maxim Cournoyer
005912c595
services: mpd: Rename %set-user-group to set-user-group.
The convention to use % as a prefix is for "special" variables rather than
procedures.

* gnu/services/audio.scm (%set-user-group): Rename to...
(set-user-group): ... this.
2023-07-25 13:04:18 -04:00
Maxim Cournoyer
42c8a2e296
services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer.
* gnu/services/audio.scm (mpd-user-sanitizer, %mympd-user): Remove extraneous
group field, already inherited.
(%mpd-user, %mympd-user): Clarify %lazy-group explanatory comment.  Fix
indentation.
2023-07-25 13:04:18 -04:00
Maxim Cournoyer
e1070ee160
services: mpd: Add an 'update' action to trigger a database update.
* gnu/services/audio.scm (mpd-shepherd-service): Register a new update action.
* doc/guix.texi (Audio Services): Document it.
2023-07-25 13:04:17 -04:00
Maxim Cournoyer
6a57bf9612
services: mpd: Add auto-update? field to mpd-configuration.
* gnu/services/audio.scm (mpd-configuration) [auto-update?]: New field.
* doc/guix.texi (Audio Services): Update doc.
2023-07-25 13:04:12 -04:00
Maxim Cournoyer
bdcf23cf69
services: wireguard: Add a 'configuration' action.
* gnu/services/vpn.scm (wireguard-shepherd-service) [actions]: New field.
2023-07-21 11:58:45 -04:00
Maxim Cournoyer
d2385da87e
services: wireguard: Clean-up configuration file serializer.
Previously, the generated config file would contain arbitrary whitespace that
made it look ugly.

* gnu/services/vpn.scm (<wireguard-configuration>) [dns]: Change default value
from #f to '().
(wireguard-configuration-file): Use match-record.  Format each line
individually, assembling the lines at the end to avoid extraneous white space.
* doc/guix.texi (VPN Services): Update doc.
2023-07-21 11:58:44 -04:00
Maxim Cournoyer
8d785c43ba
services: wireguard: Implement a dynamic IP monitoring feature.
* gnu/services/vpn.scm (<wireguard-configuration>)
[monitor-ips?, monitor-ips-internal]: New fields.
* gnu/services/vpn.scm (define-with-source): New syntax.
(wireguard-service-name, strip-port/maybe)
(ipv4-address?, ipv6-address?, host-name?)
(endpoint-host-names): New procedure.
(wireguard-monitoring-jobs): Likewise.
(wireguard-service-type): Register it.
* tests/services/vpn.scm: New file.
* Makefile.am (SCM_TESTS): Register it.
* doc/guix.texi (VPN Services): Update doc.

Reviewed-by: Bruno Victal <mirai@makinata.eu>
2023-07-21 11:58:44 -04:00
Maxim Cournoyer
f15c5edb1a
services: herd: Add a new 'current-service' procedure.
* gnu/services/herd.scm (current-service): New procedure, mostly reusing the
existing current-services.
(current-services): Implement in terms of the above procedure.
2023-07-21 11:58:44 -04:00
Janneke Nieuwenhuizen
9c1957921a
services: static-networking: Support netdde for the Hurd.
As suggested by Sergey Bugaev on bug-hurd

    https://lists.gnu.org/archive/html/bug-hurd/2023-05//msg00455.html

* gnu/services/base.scm (static-networking->hurd-pfinet-options): Use
/DEV/ethX.  Use long options for settrans.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-07-13 19:00:05 +02:00
Janneke Nieuwenhuizen
09657f3ee7
services: childhurd: Bump default qemu memory to 2048MB.
When booting with pci-arbiter and rumpdisk and using 1024MB of memory for
qemu, booting hangs, or seems to hang, at the end of the rumpdisk boot
messages.  At least 1200MB is required, currently.

* gnu/services/virtualization.scm (<hurd-vm-configuration>)[memory-size]: Bump
to 2048.
* gnu/system/examples/bare-hurd.tmpl: Suggest using 2048 here too.  Update
example `guix system image' and "qemu" command lines too.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-07-13 18:59:02 +02:00
Tobias Geerinckx-Rice
820e32b556
services: cgit: Remove ‘cgit-repo’ left-overs.
This follows up on commit 16d77b31c5.

* gnu/services/cgit.scm (cgit-configuration): Use extant
repository-cgit-configuration variable name.
2023-07-02 02:00:09 +02:00
Josselin Poiret
612399df3e
services: libvirt: Add requirement on dbus.
* gnu/services/virtualization.scm (libvirt-shepherd-service): Add requirement
on dbus.
2023-07-07 21:14:10 +02:00
Josselin Poiret
4722496292
gnu: gnome: Remove gnome-boxes from default GNOME apps.
* gnu/packages/gnome.scm (gnome): Remove gnome-boxes from propagated-inputs,
since it is no longer a Core App in 42.
2023-07-07 21:14:09 +02:00
Bruno Victal
cbc14b3bae
services: nginx: Harden php-location settings.
* gnu/services/web.scm (nginx-php-location): Only pass existing PHP files
to the back end.  Mitigate httpoxy vulnerability.
2023-07-02 02:00:01 +02:00
John Kehayias
63660f0feb
services: pam-limits: Add lightdm.
Without this a user's pam-limits-service-type configuration does not have an
effect when using lightdm.

* gnu/services/base.scm (pam-limits-service-type): Add "lightdm" to the list.
2023-06-27 15:43:27 -04:00
Ludovic Courtès
6c0e7b2665
services: Validate 'provision' field of <shepherd-service>.
Fixes <https://issues.guix.gnu.org/63979>.

* gnu/services/shepherd.scm (validate-provision): New procedure.
(<shepherd-service>)[provision]: Use it.

Co-authored-by: Bruno Victal <mirai@makinata.eu>
2023-06-25 23:46:03 +02:00
Ludovic Courtès
deeee98a50
services: dicod: Use one inetd endpoint per interface.
* gnu/services/dict.scm (dicod-shepherd-service): Remove
the (= 1 (length interfaces)) restriction by adding one endpoint per
interface.
2023-06-24 16:11:07 +02:00
Saku Laesvuori
a82130de50
services: certbot: Fix nginx crash when certbot is used without domains.
* gnu/services/certbot.scm (certbot-nginx-server-configurations):
Don't return a broken nginx-server-configuration with empty server_name
when no certificate domains are configured. Instead add a separate
server for every certificate, so 0 certificates adds 0 servers.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Reviewed-by: Bruno Victal <mirai@makinata.eu>
2023-06-18 23:12:10 +02:00
Ludovic Courtès
c27479a739
services: qemu-guest-agent: Add dependency on udev.
Fixes <https://issues.guix.gnu.org/64057>.

* gnu/services/virtualization.scm (qemu-guest-agent-shepherd-service):
Add 'requirement' field.

Reported-by: Yann Dupont <yann.dupont@univ-nantes.fr>
2023-06-16 00:14:52 +02:00
Ludovic Courtès
26602f4063
services: static-netwoking: Wait for devices to show up.
Fixes <https://issues.guix.gnu.org/63516>.

* gnu/services/base.scm (network-set-up/linux): Add call to
'wait-for-link'.
2023-06-14 23:48:01 +02:00
muradm
f4f5ee6ad6
services: screen-locker-service-type: Configurable PAM and setuid.
screen-locker-service-type by default does both define PAM entry
and make program setuid binary. Normally both methods are
mutually exclusive, if binary has setuid set it does not really
needs PAM, otherway around also similar, if PAM is enabled
binary should not relay on setuid.

Recent swaylock package now compiled with PAM support. When PAM
support is compiled in, swaylock rejects executing if binary is
also setuid program.

This change turns screen-locker-configuration from strict
PAM AND setuid to more flexible PAM AND/OR setuid. Allowing
swaylock to be configured properly while supporting other
screen locker preferences.

* gnu/services/xorg.scm (screen-locker-configuration): Switch from
define-record-type to define-configuration.
[using-pam?]: New field to control PAM entry existence.
[using-setuid?]: New field to control setuid binary existence.
(screen-locker-pam-services): Should not make unix-pam-service if
using-pam? is set to #f.
(screen-locker-setuid-programs): Should not make program setuid
program if using-setuid? is set to #f.
(screen-locker-generate-doc): Internal function to generate
configuration documentation.
(screen-locker-service): Adapt to new screen-locker-configuration.
* gnu/services/desktop.scm (desktop-services-for-system): Adapt to
new screen-locker-configuration.
* doc/guix.texi: Reflect new changes to screen-locker-configuration.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04 10:33:55 +02:00
Ludovic Courtès
d23d8fcee9
services: herd: "Resolve" transient services only when needed.
This allows us to get rid of the "eval root" actions, which in turn
would lead to confusing "Evaluating user expression" messages.

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

* gnu/services/herd.scm (resolve-transients): In 'values', avoid
'eval-there' call when UNRESOLVED is empty.
2023-05-30 00:15:29 +02:00
Ludovic Courtès
689460f82a
services: guix: Depend on 'avahi-daemon' when 'discover?' is set.
Previously, with shepherd 0.10.0, guix-daemon would start quickly,
possibly before avahi-daemon is running.  Consequently, its "guix
discover" child process would exit immediately with a warning saying
"Avahi daemon is not running".

* gnu/services/base.scm (guix-shepherd-service): When DISCOVER? is true,
add 'avahi-daemon' to 'requirement'.
2023-05-24 15:04:00 +02:00
muradm
e02584b456
services: cups: Add cups PAM service.
Fixes <https://issues.guix.gnu.org/63198>.

Have the CUPS service extend pam-root-service-type providing minimal
configuration to authenticate users.  Since PAM authentication is provided,
the regular cups package can be used as default instead of the minimal,
PAM-lacking variant.

* gnu/services/cups.scm (cups-configuration)
[cups]: Replace cups-minimal with cups.
[allow-empty-password?]: PAM service configuration permitting empty passwords.
(opaque-cups-configuration): Likewise.
(cups-pam-service): New procedure.
(cups-service-type): Extend pam-root-service-type with cups-pam-service.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-05-23 20:26:19 -04:00
Ludovic Courtès
896a51258a
services: Transient inetd services inherit requirements.
That way, per-connection transient services such as 'sshd-123' inherit
dependencies of their "parent" ('sshd' in this example), which is more
consistent than not depending on anything.

* gnu/services/dict.scm (dicod-shepherd-service): Pass #:requirements to
'make-inetd-constructor'.
* gnu/services/messaging.scm (bitlbee-shepherd-service): Likewise.
* gnu/services/ssh.scm (openssh-shepherd-service): Likewise.
* gnu/services/vnc.scm (xvnc-shepherd-service): Likewise.
2023-05-21 01:04:39 +02:00
Ludovic Courtès
d0168e1895
services: root-file-system: Remove reference to 'stop-logging'.
* gnu/services/base.scm (%root-file-system-shepherd-service): In 'stop'
method, remove reference to 'stop-logging'.  That procedure is gone in
Shepherd 0.10.0, leading to an unbound-variable exception.
Additionally, calling is unnecessary since 0.4.0, where shepherd logs to
syslog (thus the open file descriptor is not backed by an on-disk file).
2023-05-21 01:04:39 +02:00
Ludovic Courtès
d99a4c4cb3
services: agetty: 'stop' method does nothing when running is 'idle.
This is a followup to 57e731c358.

* gnu/services/base.scm (agetty-shepherd-service): Change 'stop' method
to return #f immediately when the running value is 'idle.
2023-05-21 01:04:39 +02:00
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