Commit graph

2362 commits

Author SHA1 Message Date
Ian Eure
f662e50745
gnu: %standard-geoclue-applications: Add more programs.
If Firefox merits a spot on this list, LibreWolf and IceCat certainly do.

Redshift also requires geoclue to work, add it.

* gnu/services/desktop.scm (%standard-geoclue-applications): Add LibreWolf and
Redshift.

Change-Id: Ide54f6bfe8ad8d9282da6105eca07bbd4bd27c14
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-09 22:05:14 +02:00
Sören Tempel
a9f0a0635d
services: Deprecate dhcp-client-service-type.
ISC's dhcclient has reached its end-of-life in 2022 and is since
unsupported [1]. I have added a service for dhcpcd as an alternative a
few months ago [2]. Presently, I am not aware of any issues with it;
hence, I believe it is now time to deprecate dhcp-client-service-type in
favor of dhcpcd-service-type.

See also: https://issues.guix.gnu.org/68619

* gnu/services/networking.scm (dhcp-client-service-type): Deprecate.

[1]: https://www.isc.org/blogs/isc-dhcp-eol/
[2]: https://issues.guix.gnu.org/75934

Change-Id: I282c6a68570ccc5dfbb21176758c71cf03864ddd
Signed-off-by: Hilton Chain <hako@ultrarare.space>
2025-06-08 22:56:48 +08:00
Ludovic Courtès
5a0271c43f
services: iwd: Use the official name.
* gnu/services/networking.scm (iwd-shepherd-service): Fix name and
mention “iwd” in ‘description’.
* doc/guix.texi (Networking Setup): Correct iwd’s name and add link.

Change-Id: I7605488f2018b8ac60664c6617a82f05ddadf6ec
2025-06-06 18:30:27 +02:00
Ludovic Courtès
33ec2f58ff
services: iwd: Provide default value in <iwd-settings>.
Fixes a failure of ‘tests/guix-system.sh’, when running ‘guix system
search .’:

    2296:10  3 (iwd-environment _)
     2165:0  2 (%iwd-network-settings-name-resolving-service-procedure #)
  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 struct-vtable: Wrong type argument in position 1 (expecting struct): %unset-marker%

* gnu/services/networking.scm (iwd-settings)[network]: Provide default
value.

Change-Id: I2ea28853f698583ceeaa0b56cde8447fe3546dc3
2025-06-06 18:22:51 +02:00
Ludovic Courtès
5f3a33f659
services: rsync: Remove Shepherd 0.9.0 compatibility shim.
* gnu/services/rsync.scm (rsync-shepherd-service): Remove
‘inetd-style?’.

Change-Id: Iab4a72ade621add1cf6e186c6c6a8be415829d11
2025-06-06 18:16:30 +02:00
Ashish SHUKLA
d2d961b76a
services: iwd: Fix expression.
This is a follow-up to c4e1081f82.  The return
value of ‘iwd-environment’ wasn't quoted.

* gnu/services/networking.scm (iwd-environment): Return list in a
G-expression.

Change-Id: I5c2fb9ecd5d5c1aa61bd7758b66c7284f6e568b3
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Fixes: https://codeberg.org/guix/guix/issues/450
2025-06-06 21:18:15 +08:00
Sergey Trofimov
c4e1081f82
services: networking: Add iwd-service-type.
* gnu/services/networking.scm (iwd-service-type): New service type.
(iwd-configuration), (iwd-settings), (iwd-scan-settings),
(iwd-general-settings), (iwd-network-settings): New configuration types.
* doc/guix.texi (Networking setup): Document it.

Change-Id: I852115b9c6768b3ec4eedb34a7f9e66438bd1429
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:43:36 +02:00
Sergey Trofimov
e4995c9978
services: network-manager: Require wireless-daemon.
* gnu/services/networking.scm
(<network-manager-configuration>)[shepherd-requirement]:
Replace wpa-supplicant with wireless-daemon.
* doc/guix.texi (Networking Setup): Adjust.

Change-Id: Id1a51429ccb6ea24839fc2aacd051a3ffe91c33c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:42:14 +02:00
Sergey Trofimov
faa8cdfc09
services: wpa-supplicant: Add 'wireless-daemon' provision.
* gnu/services/networking.scm (wpa-supplicant-configuration):
[requirement]: Deprecate, [shepherd-requirement]: New field,
[shepherd-provision]: Extract to a field. Add 'wireless-daemon to it.
* doc/guix.texi (Networking Setup): Document it.

Change-Id: Icc6fdd695e6e96ef168a085524989da639f77cd3
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:42:14 +02:00
Sergey Trofimov
2ec1469104
services: networking: Add shepherd-requirement for dhcpcd.
* gnu/services/networking.scm (dhcpcd-configuration): Add
shepherd-requirement field.
(dhcpcd-shepherd-service): Use it.
* doc/guix.texi (Networking Setup): Regenerate dhcpcd-configuration
documentation.
(File Systems): Fix typo.

Change-Id: Id347e2bed2569237685a47be82dbf686640db25b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:42:13 +02:00
Sergey Trofimov
38756ac03d
services: configuration: Add define-enumerated-field-type helper.
* gnu/services/cups.scm (define-enumerated-field-type): Move...
* gnu/services/configuration.scm (define-enumerated-field-type): ...here.
* gnu/services/vpn.scm (define-enumerated-field-type): Remove.
* gnu/services/power.scm
(define-enum): Replace with define-enumerated-field-type.

Change-Id: I89ec40f479e3f800268e714f1f88d638be017c7e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:42:13 +02:00
Ludovic Courtès
1cd221c9e9
services: static-networking: Remove use of unbound variable.
Use of ‘G_’ was added in 670d985cab but
it’s actually unbound.

* gnu/services/base.scm (network-set-up/linux): Remove uses of ‘G_’,
which is unbound.

Change-Id: I6e879688ceee2fcb738e5e213cd3d539c9d89e20
2025-06-04 16:45:08 +02:00
Sergey Trofimov
a01acf2d49
services: dnsmasq: Install dbus config.
While DBUS service is enabled in dnsmasq, it does not work without installing
a config file to the system.

* gnu/packages/dns.scm (dnsmasq): Install dbus config.
* gnu/services/dns.scm (dnsmasq): Extend dbus-root-service-type.

Change-Id: I5187f65e1f2892eb10fb95e6f51955559f64dbef
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-02 11:20:23 +02:00
Sergey Trofimov
eaa0987a30
services: xorg: Make startx respect XDG_VTNR.
To allow X server to be started by shepherd, without resorting to login
managers, the determine-vty procedure has to be adjusted. Shepherd would
set /proc/self/fd/0 to /dev/null when starting the service, so the TTY
has to be extracted by other means.

* gnu/services/xorg.scm (xorg-start-command-xinit): Use XDG_VTNR
environment variable to determine VTY.

Closes: #52
Change-Id: I390217e292f6534b31d18083c9a49c009a836aad
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2025-05-30 20:48:29 +08:00
Maxim Cournoyer
cfa2de2a77
services: Modernize and test nftables service.
* doc/guix.texi (Networking Services) <nftables>: Update doc.
* gnu/services/networking.scm (list-of-debug-levels?):
(debug-level?, maybe-list-of-debug-levels?):
(nftables-configuration): Rewrite using `define-configuration'.
[debug-levels]: New field.
(nftables-shepherd-service): Honor it.
* gnu/tests/networking.scm (%inetd-echo-port): Extract to top level.
(run-iptables-test): Adjust accordingly.
(make-nftables-os): New procedure.
(%default-nftables-ruleset-for-tests): New variable.
(%nftables-os): Likewise.
(%test-nftables): New test.

Change-Id: I2889603342ff6d2be6261c3de6e4fddd9a9bbe2d
2025-05-26 13:43:28 +09:00
Maxim Cournoyer
78d4b1e52c
services: Add vte-integration-service-type to %desktop-services.
* gnu/services/desktop.scm (desktop-services-for-system):

Fixes: <https://issues.guix.gnu.org/72172>
Fixes: <https://issues.guix.gnu.org/35424>

Change-Id: Ib29468468e327801a4e95361610159de61f7e8d6
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
c743d646ee
system: Factorize bashrc default configuration.
This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the
template used for both /etc/bashrc on Guix System and ~/.bashrc for
home-bash-service-type.

Rationale: The use of /etc/skel introduce state: the file is only copied
originally when the user account is created, and never (automatically)
refreshed again.

* gnu/system.scm (operating-system-etc-service):
<profile>: Guard against souring /etc/bashrc in non-interactive, SSH case.
<bashrc>: Use %default-bashrc, having migrated the remaining definitions to...
* gnu/system/shadow.scm (%default-bashrc): ... here.  Factorize aliases to...
* gnu/services.scm (%default-bash-aliases): ... here.
(%default-bashrc-d-aliases): New variable.
(%default-etc-bashrc-d-files): Include it in the default configuration.
* gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type.
* gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now
part of %default-bashrc.
(home-bash-configuration) [guix-defaults?]: Update doc.
[aliases]: Set %default-bash-aliases as the default value.  Update doc.
* doc/guix.texi (Shells Home Services): Update documentation.
(Service Reference): Update example.

Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513
2025-05-26 13:43:03 +09:00
Christopher Baines
fe50e73307
services: guix-data-service: Fix data-service-setup-database script.
* gnu/services/guix.scm (guix-data-service-shepherd-services): Use begin
rather than lambda, add some logging and use guile from the data service
package.

Change-Id: I915682e513a3cc8e3cbf324e3c650c65d2852a96
2025-05-25 13:47:15 +01:00
Sughosha
9bc97424d3
services: readymedia: Fix typo.
* gnu/services/upnp.scm (readymedia-configuration)[home-service?]: Fix typo.

Change-Id: Ie7062fbeb88f93d698bbafacf50f8a74766d4202
Signed-off-by: Ian Eure <ian@retrospec.tv>
2025-05-24 10:54:30 -07:00
Sughosha
b1d2483ebe
home: services: Add readymedia.
* gnu/home/services/upnp.scm: New file.
* gnu/local.mk: Register it.
* gnu/services/upnp.scm: Export readymedia-activation and
readymedia-shepherd-service.
(<readymedia-configuration>)[home-service?]: New field.
[cache-directory]: Adjust value depending on 'for-home?'.
[log-directory]: Ditto.
(readymedia-shepherd-service): Adjust 'requirement' and 'start' according to
'home-service?'.
(readymedia-activation): Adjust creating 'media-directories' with permissions
according to 'home-service?'.
* gnu/tests/upnp.scm (%readymedia-configuration-test): Configure port with
%readymedia-default-port.
* doc/guix.texi (Miscellaneous Home Services): Document Readymedia Service.
(Miscellaneous Services): Add cross-reference.

Change-Id: I5c48595d84a815d98e03c7f68a716f048903720c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-05-18 22:55:54 +02:00
Giacomo Leidi
1220d1a84e
home: Add home-restic-backup service.
* gnu/services/backup.scm: Drop mcron obsolete export.
(restic-backup-job-program): Generalize to restic-program.
(lower-restic-backup-job): New procedure implementing a standard way to
lower restic-backup-job records into lists.
(restic-program): Implement general way to run restic commands, for
example to initialize repositories.
(restic-backup-configuration): Reimplement
with (guix records).
(restic-backup-job-{logfile,command,requirement,modules}): Add new
procedures and add support for Guix Home environments.
(restic-backup-job->shepherd-service): Add support for Guix Home
environments.
(restic-backup-service-activation): Drop procedure as now the Shepherd
takes care of creating timers log file directories.
(restic-backup-service-type): Drop profile and activation services extensions.
* gnu/home/services/backup.scm: New file.
* gnu/local.mk: Add this.
* doc/guix.texi: Document this.

Change-Id: Ied1c0a5756b715fba176a0e42ea154246089e6be
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-05-18 22:55:53 +02:00
Rutherther
f29c25ad78
gnu: /etc/qemu/firmware: Produce only /etc/qemu/firmware instead of /etc/qemu
The service unnecessarily populates /etc/qemu with a symlink, so it's not
possible to write files like /etc/qemu/bridge.conf or /etc/qemu/host.conf
anymore. Since etc-service-type uses file-union, it's possible to put files in
subdirectories. This restores the behavior suggested by manual where user can
extend etc-service-type with qemu/host.conf etc.

* gnu/services/virtualization.scm (/etc/qemu/firmware): Extend with
qemu/firmware instead of qemu

Change-Id: I7c1ea790e5abf7ad05dce56b7901ac6eb90208fd
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-16 17:01:12 +09:00
Alexey Abramov
efcf1a2334
services: dnsmasq: Add stats and reload shepherd actions.
* gnu/services/dns.scm (dnsmasq-service-reload-action): New function.
Implements SIGHUP handling for reloading configurations.
(dnsmasq-service-stats-action): New function. Implements SIGUSR1
handling for dumping statistics.
(dnsmasq-shepherd-service): Use new actions.
* doc/guix.texi: Document new actions with examples.
* gnu/tests/networking.scm (%test-dnsmasq): Add tests to verify the
functionality of new actions.

Change-Id: I31f0eb4b26a582e95f7bfdb240110c139f0e16cc
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-16 17:01:11 +09:00
Alexey Abramov
50126b39ac
services: dnsmasq: Add pid-file, conf-file and conf-dir configuration fields.
* gnu/services/dns.scm (<dnsmasq-configuration>) [pid-file]: New field
to specify alternate path for dnsmasq PID.
[conf-file]: New field to specify one or more configuration files.
[conf-dir]: New field to read configuration files from a directory.
[extra-options]: Move to the end of the definition as a last resort option.
(dnsmasq-shepherd-service): Use new fields instead of hardcoded values.
* gnu/services/dns.scm: Export all record accessors.
* doc/guix.texi: Document new configuration options.

Change-Id: Iaec361e7d8bfd60af04f023f57d422b55b0c1eea
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-16 17:01:11 +09:00
Alexey Abramov
6d5f630fa5
services: dnsmasq: Add shepherd-provision and shepherd-requirement fields.
* gnu/services/dns.scm (<dnsmasq-configuration>)[provision]: Mark
filed as deprecated with a warning.  Set default to #f.
[shepherd-provision]: Add new field for consistency with other services.
[shepherd-requirement]: Add new field.
(dnsmasq-shepherd-service): Use them.
* doc/guix.texi: Document these changes.
* doc/guix-cookbook.texi (Custom NAT-based network for libvirt): Update
example to use 'shepherd-provision' instead of 'provision'.

Change-Id: Icad4d9c4be5bf58368e8c416f1fdde1f9065557d
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-16 17:01:11 +09:00
Giacomo Leidi
30259d52e1
services: oci-container-configuration: Move to (gnu services containers).
This patch moves the oci-container-configuration and related
configuration records to (gnu services containers).
Public symbols are still exported for backwards
compatibility but since the oci-container-service-type will be
deprecated in favor of the more general oci-service-type, everything is
moved outside of the docker related module.

* gnu/services/docker.scm: Move everything related to oci-container-configuration
to...
* gnu/services/containers.scm: ...here.scm.

Change-Id: Iae599dd5cc7442eb632f0c1b3b12f6b928397ae7
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-15 11:09:11 +09:00
Giacomo Leidi
92058c15c8
services: rootless-podman: Use login shell.
This commit allows for having PATH set when changing the owner of
/sys/fs/group.

* gnu/services/containers.scm (crgroups-fs-owner): Use login shell.

Change-Id: I9510c637a5332325e05ca5ebc9dfd4de32685c50
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-15 11:09:11 +09:00
Maxim Cournoyer
3bb6147fdc
services: udev: Also create subsystem nodes at boot.
This is a more correct fix to CDROM/DVDROM events/auto-mounting than was made
in the now-reverted commit 670724edcf ("gnu: eudev: Fix optical discs
detection/auto-mounting.")

This changes causes the 60-block.rules udev rules file shipped with eudev to
correctly set the default polling period to 2000 ms on block devices, which is
necessary for kernel events to be fired for CDROM drives for example.  To
validate it is set:

  # cat /sys/module/block/parameters/events_dfl_poll_msecs
  2000

Before, it would return 0.

* gnu/services/base.scm (udev-shepherd-service): <#:start>: Add a 'udevadm
trigger --change=add --type=subsystems' invocation, so that it also creates
subsystem nodes, as done in Void Linux or LinuxFromScratch init scripts for
example.
* gnu/tests/base.scm (run-basic-test): Add test.

Fixes: <https://issues.guix.gnu.org/35584>
Change-Id: Idc0eb5640163b27e41b72cc0c1885412a60805c1
2025-05-14 22:10:44 +09:00
Efraim Flashner
850a2bfdc0
system: Only add guix artwork on a desktop system.
* gnu/system.scm (%base-packages): Remove %base-packages-artwork.
* gnu/services/desktop.scm (desktop-services-for-system): Add
guix-artwork profile service.

Change-Id: I4071e8137609dbb7dfdba174d1da2d8811421a00
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-12 09:33:27 +03:00
Christopher Baines
5137d4a96c
services: guix-build-coordinator: Allow passing extra arguments.
To avoid needing to support all possible configuration options in the Guix
service.

* gnu/services/guix.scm
(guix-build-coordinator-configuration-extra-build-coordinator-arguments): New
procedure.
* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Support
extra-build-coordinator-arguments and include them when calling
make-build-coordinator.
(guix-build-coordinator-shepherd-services): Pass
extra-build-coordinator-arguments through when calling
make-guix-build-coordinator-start-script.

Change-Id: I6531275bf2922f762b3422746c6207b834656b5c
2025-05-11 10:19:11 +01:00
Evgeny Pisemsky
44d178265c
services: Add mosquitto-service-type.
* gnu/services/messaging.scm (<mosquitto-configuration>): New record type.
(mosquitto-accounts): New procedure.
(mosquitto-shepherd-service): New procedure.
(mosquitto-service-type): New variable.
* doc/guix.texi (Messaging Services): Document it.

Change-Id: I3500c5b6b69084c1f4a6da66ea45bfd42c871f3f
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-05-09 19:47:24 +02:00
Rutherther
e9cd72875e
services: guix: Fix case when /etc/guix/acl is a dangling symlink.
One possible solution for an issue when /etc/guix/acl file exists, but points
to a non-existent location. This can for example happen if one is
reinitializing the system, and remove only /gnu/store and /var/guix, keep the
rest okay. This is a major advantage of guix as compared to other distros that
usually need you to reinitialize the whole root partition. But this will leave
the user with acl file pointing to non-existent location. The file-exists?
procedure will return #f for broken symbolic links.

I think that another reason one would get this issue is, if one was booted in
a live iso, chrooted, fixing their system. They would switch generations to
one with different acl file, delete other generations gc rooting the original
acl file and then gc. One could do this approach for example when recovering
from file corruptions in the store, to get rid of the unsubstitutable paths
that can't be repaired with guix gc --verify.

This fixes the issue by looking for type of a file through lstat, instead of
relying on file-exists?. If the symlink is a broken symlink, it is
removed. Other than that the old behavior is kept:
- If regular file, back it up
- If symlink pointing to the store, remove it
- If symlink not pointing to the store, back it up

* gnu/services/base.scm (substitute-key-authorization): Check if acl file is a
possibly-dangling symbolic link.

Change-Id: I2f8170606b2f4afeea48f04acfd738b04cafc7cf
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modified-by: Ludovic Courtès <ludo@gnu.org>
2025-05-05 14:33:59 +02:00
Sughosha
9f7f05e11f
Partial revert "services: plasma: Fix kded not being started."
This partially reverts cea6eedfce.

* gnu/services/desktop.scm (plasma-dbus-service): Remove kded.

Change-Id: Iaf441f6c779170a24ab2bec8908da81b182e32b1
Signed-off-by: Zheng Junjie <z572@z572.online>
2025-05-04 21:58:41 +08:00
Sergio Pastor Pérez
cea6eedfce
services: plasma: Fix kded not being started.
`kded' is a daemon responsible for many features of the Plasma desktop, it
provides media keys handling, a system tray, 'Background Services' control
through 'kcmshell6 kcm_kded'...

* gnu/packages/kde-plasma.scm (plasma): Add `kded' to propagated inputs.

* gnu/services/desktop.scm (plasma-dbus-service): Add `kded' to the list of
services passed to `dbus-configuration'.

Change-Id: Ifffdaecdb28a6369727ab8d118a775d73ee342e9
Signed-off-by: Zheng Junjie <z572@z572.online>
2025-05-04 17:58:56 +08:00
Sergio Pastor Pérez
492bbb9700
services: kwallet: New service.
Change-Id: I1330ce5e1648a8ddf6ddd507255a73335d6baa51
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-02 22:06:26 +09:00
Giacomo Leidi
9d216d2ae9
services: postgresql-role: Add support for password files.
This commit adds a password-file to the postgresql-role field.  It
allows users to provision Postgres roles with a set password.

* gnu/services/databases.scm (postgresql-role): Add password-file field.
(postgresql-role-configuration): Add requirement field.
(postgresql-create-roles): Add support for setting passwords from a
file without leaking passwords to the command line.
(postgresql-role-shepherd-service): Add support for customizable
requirements.
(postgresql-role-service-type): Pass on postgresql-role-configuration
fields values by default, this way user configured fields are not lost.
* gnu/tests/databases.scm: Test it.
* doc/guix.texi: Document the new field and fix the extension point example.

Change-Id: I3aabaa10b0c5e826c5aa874e5649e25a3508a585
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-02 15:32:25 +09:00
Maxim Cournoyer
74325f91c9
services: Normalize and improve libvirt-configuration documentation.
* gnu/services/virtualization.scm (libvirt-configuration): Fix typos and
punctuation, and decorate with more Texinfo adornments.  Remove extraneous
text.  Convert enumerations to sentences re-generating the Texinfo
documentation with configuration->documentation doesn't require fixing these
by hand after (the text is re-flowed, breaking enumerations).  Mention the use
of 'log-filters' is preferable to 'log-level', as commented in the defaut
libvirt.conf template.
* doc/guix.texi (Virtualization Services): Re-generate.

Change-Id: Icc2abe21a787b4bb6ac3b35a95f6aaaf3bbda9aa
2025-05-02 09:53:54 +09:00
Maxim Cournoyer
bb8cc412c8
services/udev: Allow configuring udev to run in debug mode.
This re-introduces commit dd64f441d3, which had
been reverted due to previously causing a system hang when debug? was enabled,
a problem that appears to have been resolved within Shepherd.

* gnu/services/base.scm (<udev-configuration>): <debug?>: New field.
* gnu/services/base.scm (udev-shepherd-service): Use it to add '--debug' to
the command line, if applicable.
* doc/guix.texi (Base Services): Document it.

Change-Id: I88243fb4f321ff0876dd227e3c2b22082d37cfcf
2025-04-30 22:44:34 +09:00
Maxim Cournoyer
f10d00e4e2
services: elogind: Split sleep.conf and port to define-configuration.
* gnu/services/desktop.scm (pascal-case): New procedure.
(<elogind-configuration>): Rewrite in terms of define-configuration.
(elogind-configuration-file): Delete.
(maybe-list-of-suspend-states?, maybe-list-of-suspend-modes?)
maybe-list-of-user-names?, maybe-boolean?maybe-package?)
(maybe-action?, maybe-percent?, maybe-list-of-strings?)
(maybe-list-of-hibernation-modes?, maybe-non-negative-integer?)
(non-negative-integer?, percent?, char-set:user-name, user-name?)
(list-of-user-names?, %elogind-actions, action?, %linux-suspend-states)
(string->symbol/maybe, suspend-state?, list-of-suspend-states?)
(%linux-suspend-modes, suspend-mode?, list-of-suspend-modes?)
(%linux-hibernation-modes, hibernation-mode?, list-of-hibernation-modes?)
(elogind-deprecated-empty-serializer, list-of-file-likes?)
(elogind-serialize-boolean, elogind-base-serializer, elogind-serialize-action)
(elogind-serialize-non-negative-integer, elogind-serialize-percent)
(elogind-list-serializer, elogind-serialize-list-of-strings)
(elogind-serialize-list-of-user-names, elogind-serialize-list-of-suspend-states)
(elogind-serialize-list-of-suspend-modes)
(elogind-serialize-list-of-hibernation-modes)
(%elogind-configuration-sleep-fields, logind.conf, sleep.conf): New procedures.
(elogind-etc-directory): Create the main configuration files there too.
(elogind-dbus-service): Adjust for package accessor name change.
(pam-extension-procedure, elogind-shepherd-service)
(elogind-service-type):  Likewise.
(shepherd-configuration-action*): New procedure.
* doc/guix.texi (Desktop Services): Fully document configuration options.

Fixes: https://issues.guix.gnu.org/77806
Change-Id: I8767891871d83e58d64995ec986a7d01689fa6d8
Reported-by: Ludovic Courtès <ludo@gnu.org>
2025-04-26 22:56:59 +09:00
Tomas Volf
5bbb053bea
services: postgresql-service-type: Allow allowing to log into the user.
It is often useful to be able to use the `postgres' user for management tasks,
so this commit allows setting that.  The default behavior is not changed.

I have also added missing exports and sorted them by alphabet.

* gnu/services/databases.scm (%default-home-directory): New variable.
(<postgresql-configuration>): Add home-directory, allow-login? fields.
(create-postgresql-account): Use them.
* doc/guix.texi (Database Services): Document it.

Change-Id: I2212e5082ff4e87c49a5a8a4711bf929dd08626a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modified-by: Ludovic Courtès <ludo@gnu.org>
2025-04-23 12:25:46 +02:00
Maxim Cournoyer
aab89b3d93
services: pounce: New service.
* gnu/services/messaging.scm (pounce-serialize-boolean):
(pounce-serialize-string, pounce-serialize-list-of-strings)
(pounce-serialize-pair, power-of-two?)
(pounce-serialize-number, pounce-serialize-power-of-two)
(pounce-serialize-port, pounce-serialize-maybe-boolean)
(pounce-serialize-maybe-number, pounce-serialize-maybe-pair)
(pounce-serialize-maybe-port, pounce-serialize-maybe-port
(pounce-maybe-power-of-two, pounce-serialize-maybe-string)
(pounce-serialize-maybe-list-of-strings): New procedures.
(pounce-configuration): New configuration.
(pounce-activation): New procedure.
(serialize-pounce-configuration, pounce-wrapper): Likewise.
(pounce-service-type): New service type.
* gnu/tests/messaging.scm (ngircd-tls-cert-service-type): New variable.
(%pounce-os): Likewise.
(run-pounce-test): New procedure.
(%test-pounce): New test.
* doc/guix.texi (Messaging Services): Document it.

Change-Id: I4bbd2bc4821072a93c2c4017b86df329c4b240cb
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2025-04-22 11:35:24 +09:00
Maxim Cournoyer
367d071bba
services: herd: Use a smarter default for %shepherd-socket-file.
This makes it possible to use it for the privileged (root) user as well as an
unprivileged user.

* gnu/services/herd.scm (%shepherd-socket-file): Use
/run/user/$uid/shepherd/socket when using an unprivileged user.

Change-Id: I62cf358ffc233aba61cc64235c4b67c4fc944d2e
2025-04-22 11:35:23 +09:00
Ludovic Courtès
e2583b5a17
services: guix: Allow ‘guix-daemon’ to run without root privileges.
* gnu/services/base.scm (run-with-writable-store)
(guix-ownership-change-program): New procedures.
(<guix-configuration>)[privileged?]: New field.
(guix-shepherd-service): Rename to…
(guix-shepherd-services): … this.   Add the ‘guix-ownership’ service.
Change ‘guix-daemon’ service to depend on it; when unprivileged,
prefix ‘daemon-command’ by ‘run-with-writable-store’ and
omit ‘--build-users-group’; adjust socket activation endpoints.
(guix-accounts): When unprivileged, create the “guix-daemon” user and
group in addition to the others.
(guix-service-type)[extensions]: Adjust to name change.
* gnu/tests/base.scm (run-guix-daemon-test): Add ‘name’ parameter.
(%test-guix-daemon): Adjust accordingly.
(%test-guix-daemon-unprivileged): New test.
* doc/guix.texi (Base Services): Document ‘privileged?’.
(Migrating to the Unprivileged Daemon): Explain that this is automatic
on Guix System.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I28a9a22e617416c551dccb24e43a253b544ba163
2025-04-20 18:52:59 +02:00
Maxim Cournoyer
a6c96cdb70
services: ngircd: Require networking.
Otherwise the service could fail starting if the networking interface takes
some time to be created during the boot (one such example are WireGuard
interfaces).

* gnu/services/messaging.scm (ngircd-configuration)
[shepherd-requirement]: Add networking.
* doc/guix.texi (Messaging Services): Update.

Change-Id: I387ae5780a35cad5b74d9883ac53f13de1a08c78
2025-04-19 21:43:18 +09:00
Maxim Cournoyer
7686fe9d4f
services: ngircd: Streamline wrapper definition.
* gnu/services/messaging.scm (ngircd-shepherd-service): Streamline wrapper
definition.

Change-Id: Ie48a02d141ab329a5b684897fb2562b4e6745452
2025-04-19 21:13:21 +09:00
Roman Scherer
98a6071b5a
gnu: speakersafetyd: Add log file.
* gnu/services/sound.scm (speakersafetyd-configuration) [log-file]: New field.
(speakersafetyd): Use it via #:log-file.

Change-Id: I870bc7bfd69249da3a9c981f627e751395386bd2
2025-04-14 13:49:29 +09:00
Roman Scherer
01a66639ef
gnu: speakersafetyd: Run as unprivileged user.
* gnu/services/sound.scm (speakersafetyd): Run as unprivileged user.
(speakersafetyd-accounts): New procedure.
(speakersafetyd-activation): Likewise.
(speakersafetyd-shepherd-service): Specify the #:group, #:user and
 #:supplementary-groups arguments.
(speakersafetyd-service-type): Extend activation-service-type.

Change-Id: I870bc7bfd69249da3a9c981f627e751395386bd2
2025-04-14 13:48:01 +09:00
Maxim Cournoyer
e78f8a85bb
services: ngircd: Revert to use make-forkexec-constructor.
The use of make-systemd-constructor appears to cause problems when connecting
via TLS (see: https://github.com/ngircd/ngircd/issues/330).

* gnu/services/messaging.scm (ngircd-global): [pid-file]: Set default value
and remove maybeness.  Adjust doc.
* gnu/services/messaging.scm (ngircd-configuration): Adjust comment.
(ngircd-wrapper): Expose writable PID file and preserve pid namespace.
(ngircd-shepherd-service): Replace make-systemd-constructor with
make-forkexec-constructor and adjust surrounding accordingly.
(ngircd-activation): New procedure.
(ngircd-service-type): Extend activation-service-type with it.

Change-Id: Ic7c135ab45122e180107cde8bb9976426e3afbc4
2025-04-14 10:34:52 +09:00
Maxim Cournoyer
f1d1f3c945
services: ngircd: Fix typo in doc.
* gnu/services/messaging.scm (ngircd-options) <pam?>: Fix typo.
* doc/guix.texi (Messaging Services): Update.

Change-Id: If14e406089b2c945cac37e25d8e08a3812e4b28e
2025-04-14 10:34:51 +09:00
Maxim Cournoyer
d46bad2cd9
services: ngircd: Disable PAM by default.
This was the original intention, as PAM authentication cannot be easily
satisfied when the service runs as non-root, which is the case.

* gnu/services/messaging.scm (ngircd-configuration) <options>: Remove maybe
and set default value.
* doc/guix.texi (Messaging Services): Update.

Change-Id: I8435cf5be7206f9165d69cbbac11c205bf928c8f
2025-04-14 10:34:51 +09:00