summaryrefslogtreecommitdiff
path: root/gnu/services/base.scm
AgeCommit message (Collapse)Author
2026-03-01services: greetd: Fix Signal.Danny Milosavljevic
* gnu/services/base.scm (%greetd-pam-mount-rules): Remove noexec. Closes: guix/guix#5083 Change-Id: Iede81a8afecc8d7213e9eb101ac7eeec3bb9632b
2026-02-06services: static-networking: Add ‘scope’ field to <network-route>.Ludovic Courtès
* gnu/services/base.scm (assert-network-route-scope): New procedure. (<network-route>)[scope]: New field. (network-set-up/linux)[route-scope->constant]: New procedure. Use it to pass #:scope to ‘route-add’. * doc/guix.texi (Networking Setup): Document it. Fixes: guix/guix#4175 Reported-by: Christopher Baines <mail@cbaines.net> Change-Id: I24399eca6e691d63fa3d01be564060a3d693d650 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #5507
2026-02-06services: static-networking: Tweak error messages.Ludovic Courtès
* gnu/services/base.scm (assert-network-link-mac-address): Change error message string to conform to standards. (assert-network-link-type): Change to ‘define-with-syntax-properties’ since previously it would reject a non-literal symbol. Adjust message string. Change-Id: I0a8b9d7512ca7567f9d60eb15ad6fb4e05020e48 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-25services: guix: Pretty print /etc/guix/channels.scm.Hilton Chain
* gnu/services/base.scm (install-channels-file): Pretty print channels.scm. Change-Id: I692758a4f0a3f6e57b40c95a487c7c843245fe6c
2026-01-22Merge branch 'version-1.5.0'Rutherther
Change-Id: Id73c0c74600a3da3373b3a37236b505af65bfe31
2026-01-19services: <greetd-terminal-configuration>: Default initial-session-command ↵Danny Milosavljevic
to (greetd-user-session). * gnu/services/base.scm (<greetd-terminal-configuration>)[initial-session-command]: Default to (greetd-user-session).
2026-01-14install: Register agetty on primary console on AArch64.Rutherther
This adds the possibility to parse /proc/consoles to find a primary console. Then, on AArch64 this is used in the installation image. On AArch64, the boot usually happens with chosen device tree that contains the serial console. On x86_64, this does not happen so often, so we keep the installation iso minimal there. The primary console is chosen, but there is a fallback to any non-virtual one. Virtual console (/dev/tty0) is skipped, because that one can point to any console, like /dev/tty1 and so on. So it's not safe to register agetty on it. * gnu/build/linux-boot.scm (read-linux-consoles): New variable. * gnu/services/base.scm (default-serial-console): Use primary console as fallback. * gnu/system/install.scm (%installation-services): Add agetty tty for consoles. Change-Id: Iae01f7bc85b5ffdef2e52b1d0710889915b0f54a Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2025-12-26services: greetd: Create runfiles in a tmpfs.Luca Matei Pintilie
Greetd's initial-session (i.e. auto-login) functionality requires runfiles to be deleted on shutdown. Use a tmpfs to ensure said runfiles do not linger. * gnu/services/base.scm (make-greetd-terminal-configuration-file): Add “runfile” to configuration. (%greetd-file-systems): Add a tmpfs for “/run/greetd/runfiles”. Change-Id: I07319d5d8bdb1e18fb0074b67d5c9cb9fb49b04a Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2025-12-20services: file-systems: Reverse order of unmounting manual mounts.Dariqq
* gnu/services/base.scm (file-system-shepherd-services): Reverse order of mount-points in service 'user-file-systems. Change-Id: I68df0c22bc6bacdc866b9adf62e7059f20e5842f Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2025-12-20services: file-systems: Make user-file-systems depend on file-systems.Dariqq
Previously 'user-file-systems depended only on 'file-systems without any requirements. This inverts the logic to have file-systems <- user-file-systems <- user-processes to ensure that all user mounts are already unmounted when shepherd managed file systems get unmounted. Fixes: guix/guix#4445 Fixes: guix/guix#1703 * gnu/services/base.scm (file-system-shepherd-services): Remove requirement of 'file-systems on 'user-file-systems. Add dependency of 'user-file-systems on 'file-systems. (file-system-service-type): Add 'user-file-systems to user-processes extension. Change-Id: I9d89f682fb4b4673fa135d17b2b188788b9f8db1 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2025-12-19services: nscd: Cause PID 1 to drop nscd database mappings on shutdown.Ludovic Courtès
Partly fixes guix/guix#4269. Fixes a bug whereby shepherd (PID 1) could retain memory mappings for /var/run/nscd/dbXXX, which are created by glibc’s NSS from database file descriptors sent by nscd. Those mappings could then prevent ‘root-file-system’ from re-mounting the root file system as read-write. This change causes PID 1 to drop these mappings. PID 1 typically calls libc database functions such as ‘getgr’ when dealing with AF_UNIX endpoints for socket-activated services, to look up the socket’s owner and group. This is where the bug would manifest. The regression may have been introduced by 85ac164c41fc4c93d3cb2a5d3321c63598c2855f, which caused nscd to handle the password and group databases. * gnu/services/base.scm (nscd-shepherd-service): In ‘stop’ procedure, call ‘getpw’, ‘getgr’, and ‘getaddrinfo’. * gnu/tests/base.scm (run-root-unmount-test) <"open libc NSS database">: New test. (%test-root-unmount): Add #:imported-modules. Change-Id: I197cc8c82165c631f857415898137412ce9bd439 Reported-by: Rutherther <rutherther@ditigal.xyz> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #4828
2025-10-21services: guix: Populate /etc/subgid so guix-daemon can map the “kvm” GID.Ludovic Courtès
* gnu/services/base.scm (guix-activation): Add a line for ‘guix-daemon’ in /etc/subgid. (guix-shepherd-services): Add /run/privileged/bin to ‘PATH’. Change-Id: Ic103d86986ce2ace194b0a4296a00278bf0617eb
2025-10-21services: guix: Preserve ‘guix-daemon’ user supplementary groups.Ludovic Courtès
When running ‘guix-daemon’ unprivileged, supplementary groups such as “kvm” were dropped by ‘run-with-writable-store’. * gnu/services/base.scm (run-with-writable-store): Use ‘read-group’ to determine the list of supplementary groups for ‘user’ and pass that to ‘setgroups’. Change-Id: I21cc546a91a1a24cc94cafb44fa93e088f8673a7
2025-10-11services/base: Only remount read-write if needed in run-with-writable-store.Maxim Cournoyer
* gnu/services/base.scm (run-with-writable-store): Make it a no-op when the store is already writable (useful for testing). Change-Id: If598638e9d3eeac242c265cba77f27e4a15f8d9b
2025-09-18Reapply "Update Maxim's email address."Maxim Cournoyer
This reverts commit a7db92d9b389cbe565395523882c34c6eff2c21a, this time with the more careful command, to avoid a world rebuild: grep -rl --exclude-dir=build --exclude-dir=patches --exclude=ld-wrapper.in \ --exclude=sitecustomize.py --exclude=guix-emacs.el maxim.cournoyer@gmail.com | xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g' Change-Id: I0871f5cf9ace79e34e78e24154d0da6ea95a3a91
2025-09-18Revert "Update Maxim's email address."Maxim Cournoyer
This reverts commit d0d87a744d724b7e7d5ac013c586039652087bb3. Oops! This caused a world rebuild. Change-Id: I25fff644b2b61d0ee93d69b457b04c72b5b74d15
2025-09-18Update Maxim's email address.Maxim Cournoyer
The change was automated via: git grep -l maxim.cournoyer@gmail.com | xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g' * .mailmap: New entry. Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
2025-09-14services: greetd: Accept gexps in initial-session.Rutherther
Recently initial-session-user and initial-session-command has been added, but they accept only strings, not gexps. * gnu/services/base.scm (make-greetd-terminal-configuration-file): Ungexp initial-session-user and initial-session-command. Change-Id: I2b247464528b6147eab8acea08c6942ac7bfd0ab Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-07-12services: greetd: Support initial-session.Danny Milosavljevic
* gnu/services/base.scm (<greetd-terminal-configuration>): Add initial-session-user, initial-session-command. * doc/guix.texi (Base Services): Document them. Change-Id: Iaf7a8203f34794bc36b031166e1ff7005d7a7104
2025-07-01services: guix: ‘guix-ownership’ changes store ownership last.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/78355>. * gnu/services/base.scm (guix-ownership-change-program)[claim-data-ownership]: Replace hard-coded “/gnu/store” with #$(store-prefix). Change store ownership last. Reported-by: Rutherther <rutherther@ditigal.xyz> Change-Id: I55189f8bb82bf0c9e030aa042aa928f6f552569e
2025-06-15gnu: services: base: Set a home directory for the "greeter" user.Quentin Vincent
Fix a problem that caused an "unable to set working directory: no such file or directory (os error 2)" error before every login prompt. The reason for this is that greetd starts agreety as the "greeter" user. The working directory for the newly created process is, by default, "/home/greeter", which does not exist (per our instructions). * gnu/services/base.scm (greetd-accounts)[home-directory]: Set to /var/empty [shell]: Set to /sbin/nologin. Change-Id: I6d971968e8b6a7825c261d4695caf0dd70127e5d Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-06-04services: static-networking: Remove use of unbound variable.Ludovic Courtès
Use of ‘G_’ was added in 670d985cabf81a28660c4a8024f752decc495dce but it’s actually unbound. * gnu/services/base.scm (network-set-up/linux): Remove uses of ‘G_’, which is unbound. Change-Id: I6e879688ceee2fcb738e5e213cd3d539c9d89e20
2025-05-26system: Factorize bashrc default configuration.Maxim Cournoyer
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-14services: udev: Also create subsystem nodes at boot.Maxim Cournoyer
This is a more correct fix to CDROM/DVDROM events/auto-mounting than was made in the now-reverted commit 670724edcfe7d ("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-05services: guix: Fix case when /etc/guix/acl is a dangling symlink.Rutherther
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-04-30services/udev: Allow configuring udev to run in debug mode.Maxim Cournoyer
This re-introduces commit dd64f441d3dcff9165927b821da2b69b1fc6a24f, 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-20services: guix: Allow ‘guix-daemon’ to run without root privileges.Ludovic Courtès
* 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-11gnu: eudev: Build with udevrulesdir pointing to /etc/udev/rules.d.Maxim Cournoyer
Prior to this change, only the udev rules installed to eudev's prefix were consulted by tools such as udevadm, leading to problems such as when configuring network interfaces, or attempting to override its default rules. While our custom eudev patch adding support for the EUDEV_RULES_DIRECTORY environment variable could have been refined to take precedence over the package's configured udevrulesdir, this was not pursued for the following reasons: 1. Due to eudev's using inotify to detect new rules, the EUDEV_RULES_DIRECTORY is fixed in Guix System, per commit e9fa17eb98 ("services: udev: Use a fixed location for the rules directory and config.") 2. Users would have had to set EUDEV_RULES_DIRECTORY to the fixed directory themselves to have udevadm work as expected, which is inconvenient. 3. This simple solution is already implemented and tested in NixPkgs. * gnu/packages/linux.scm (eudev) [source]: Remove custom patch. [arguments] <#:make-flags>: New argument. <#:phases>: Override install phase to alter installation make flags. * gnu/services/base.scm (udev-shepherd-service): Do not set EUDEV_RULES_DIRECTORY environment variable. * gnu/packages/patches/eudev-rules-directory.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Fixes: https://issues.guix.gnu.org/63508 Reported-by: Felix Lechner <felix.lechner@lease-up.com> Change-Id: Ib8698f4b452f6fd0951bcd71831705b1be85e6e0
2025-04-11services/base: Remove extraneous UDEV_CONFIG_FILE environment variable.Maxim Cournoyer
This environment variable used to be honored by udevd, but that is no longer the case (as shown by grepping its source). * gnu/services/base.scm (udev-shepherd-service) <#:environment-variables>: Remove UDEV_CONFIG_FILE. Change-Id: I0828de76e8da429432bc0679903aa501c99625af
2025-04-08services: Make the urandom-seed-service-type return success properly.Leo Famulari
Reported by nigko on #guix: https://logs.guix.gnu.org/guix/2025-04-05.log#201718 * gnu/services/base.scm (urandom-seed-shepherd-service): Return #f when stopped. Change-Id: I8212508e4a017270e4e9284b43170cd17999e8b4
2025-04-06services: guix: Socket-activate ‘guix-daemon’.Ludovic Courtès
* gnu/services/base.scm (guix-shepherd-service): Change ‘start’ to use ‘make-systemd-constructor’ in the default case. Remove now-redundant code creating /var/guix/daemon-socket/. Adjust ‘stop’ method to use ‘make-systemd-destructor’ when appropriate. Change-Id: I3572670c90f65509fbad01dcf13a60f772a86839
2025-04-06services: guix: Streamline the default ‘start’ case.Ludovic Courtès
* gnu/services/base.scm (guix-shepherd-service): In ‘start’ method, use ‘fork+exec-command’ in the default case. Change-Id: Id04d3d2651f89fbcdb2f17f027df91e132ff9ed1
2025-04-06services: guix: Factorize ‘guix-daemon’ arguments.Ludovic Courtès
* gnu/services/base.scm (guix-shepherd-service): In ‘start’ method, move ‘fork+exec-command/container’ arguments to the new variables ‘daemon-command’ and ‘environment-variables’. Change-Id: Ic04a1006849697e4e185ad94185bbdec8a91a05a
2025-03-05Revert "services/udev: Allow configuring udev to run in debug mode."Maxim Cournoyer
This reverts commit dd64f441d3dcff9165927b821da2b69b1fc6a24f. Enabling debug output for udevd apparently hangs the boot.
2025-03-05services: Switch to ‘shepherd-system-log-service-type’ in ↵Ludovic Courtès
‘%base-services’. This reinstates c83bfc0415ba928b746362915d67600cdbb5da62, which had been reverted in 8c483c12e94bcf43e4c44170f1d5fea5fbba4970 in response to <https://issues.guix.gnu.org/76315>. * gnu/services/base.scm (%base-services): Replace ‘syslog-service-type’ by ‘shepherd-system-log-service-type’. * doc/guix.texi (Base Services): Update ‘syslog-service-type’ documentation. (Shepherd Services): Mention that ‘system-log-service-type’ is in ‘%base-services’. Add anchor. Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I21082300f6a052865a6ab1bdff27fbe71f73d492
2025-03-03services/udev: Allow configuring udev to run in debug mode.Maxim Cournoyer
* 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-02-23services: Add missing Shepherd dependency on ‘user-processes’.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/76368>. * gnu/services/auditd.scm (auditd-shepherd-service): * gnu/services/base.scm (rngd-service-type): (gpm-shepherd-service): * gnu/services/ci.scm (laminar-shepherd-service): * gnu/services/containers.scm (rootless-podman-cgroups-fs-owner-service): (rootless-podman-cgroups-limits-service): * gnu/services/cups.scm (cups-shepherd-service): * gnu/services/databases.scm (postgresql-role-shepherd-service): * gnu/services/desktop.scm (upower-shepherd-service): (bluetooth-shepherd-service): (elogind-shepherd-service): (inputattach-shepherd-service): (seatd-shepherd-service): * gnu/services/dns.scm (knot-resolver-shepherd-services): (dnsmasq-shepherd-service): * gnu/services/docker.scm (containerd-shepherd-service): (docker-shepherd-service): * gnu/services/file-sharing.scm (transmission-daemon-shepherd-service): * gnu/services/games.scm (joycond-shepherd-service): (wesnothd-shepherd-service): * gnu/services/guix.scm (guix-build-coordinator-shepherd-services): (guix-data-service-shepherd-services): (nar-herder-shepherd-services): (bffe-shepherd-services): * gnu/services/ldap.scm (directory-server-shepherd-service): * gnu/services/linux.scm (cachefilesd-shepherd-service): (rasdaemon-shepherd-service): * gnu/services/mail.scm (dovecot-shepherd-service): (imap4d-shepherd-service): (radicale-shepherd-service): (rspamd-configuration): * gnu/services/monitoring.scm (prometheus-node-exporter-shepherd-service): (vnstat-shepherd-service): * gnu/services/networking.scm (opendht-shepherd-service): (openvswitch-shepherd-service): (pagekite-shepherd-service): (ipfs-shepherd-service): * gnu/services/nfs.scm (rpcbind-service-type): (gss-service-type): (idmap-service-type): * gnu/services/pm.scm (thermald-shepherd-service): * gnu/services/rsync.scm (rsync-shepherd-service): * gnu/services/samba.scm (samba-samba-shepherd-service): (samba-nmbd-shepherd-service): (samba-smbd-shepherd-service): (samba-winbindd-shepherd-service): (wsdd-shepherd-service): * gnu/services/security-token.scm (pcscd-shepherd-service): * gnu/services/sound.scm (speakersafetyd-shepherd-service): * gnu/services/spice.scm (spice-vdagent-shepherd-service): * gnu/services/ssh.scm (lsh-shepherd-service): (openssh-shepherd-service): (dropbear-shepherd-service): (autossh-shepherd-service): * gnu/services/telephony.scm (jami-shepherd-services): (mumble-server-shepherd-service): * gnu/services/version-control.scm (git-daemon-shepherd-service): * gnu/services/virtualization.scm (virtlogd-shepherd-service): * gnu/services/vnc.scm (xvnc-shepherd-service): * gnu/services/vpn.scm (openvpn-shepherd-service): (strongswan-shepherd-service): * gnu/services/web.scm (httpd-shepherd-services): (fcgiwrap-shepherd-service): (php-fpm-shepherd-service): (hpcguix-web-shepherd-service): (tailon-shepherd-service): (varnish-shepherd-service): (whoogle-shepherd-service): (mumi-shepherd-services): (gmnisrv-shepherd-service): (agate-shepherd-service): Add ‘user-processes’ requirement. * doc/guix.texi (Mail Services): Update accordingly. Reported-by: Dariqq <dariqq@posteo.net> Change-Id: I947bd2afc83b786cb17c555cfe73ab586b806618
2025-02-17gnu: guix-configuration: Add a chroot? parameter.Andreas Enge
The parameter should take the values #t, #f or 'default. In a container environment, 'default amounts to #f, otherwise it amounts to #t. * gnu/services/base.scm (guix-configuration)<chroot?>: New field. (guix-shepherd-service): If chroot? is #f, add "--disable-chroot". If it is #t or 'default, do nothing. * gnu/system/linux-container.scm (containerized-operating-system): If chroot? is 'default, replace it by #f. * doc/guix.texi: Document the parameter. Change-Id: I8b9c3f46ad8650fa6ed4acee947b4ae5d002d03d
2025-02-16Revert "services: Switch to ‘shepherd-system-log-service-type’ in ↵Ludovic Courtès
‘%base-services’." This reverts commit c83bfc0415ba928b746362915d67600cdbb5da62 and the corresponding ‘etc/news.scm’ entry (commits 12bd93113c7a2ddf8c1db849550d1c0ae356f039 and 622568ec13b54ad8caaa7f67d1e8686073749b8b) while investigating <https://issues.guix.gnu.org/76315>. Change-Id: Ie26c24b8cd25cee3466cc871470b0bec9a5dfafb
2025-02-15services: Switch to ‘shepherd-system-log-service-type’ in ↵Ludovic Courtès
‘%base-services’. * gnu/services/base.scm (%base-services): Replace ‘syslog-service-type’ by ‘shepherd-system-log-service-type’. * doc/guix.texi (Base Services): Update ‘syslog-service-type’ documentation. (Shepherd Services): Mention that ‘system-log-service-type’ is in ‘%base-services’. Add anchor. Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I21082300f6a052865a6ab1bdff27fbe71f73d492
2025-02-07services: Rename field in greetd-terminal-configuration record.Maxim Cournoyer
This was erroneously renamed during the review of commit ee0d1b144c ("services: greetd: Improve greeter configurations."). The field *adds* to the intrinsic requirements of the service, so the 'extra-' prefixes communicates this better. * gnu/services/base.scm (<greetd-terminal-configuration>): Rename shepherd-requirement field to extra-shepherd-requirement. * doc/guix.texi (Base Services): Adjust doc accordingly. Change-Id: I4b970bdd63864ed86d61fde9cad2487a293417ce
2025-02-07services: greetd: Use mkdir-p in activation script.Dariqq
Fixes a bug introduced in ee0d1b144c1572433c9475c32c74d61c3be9c058 where reconfiguring a system with ‘greetd-service-type’ would fail with: guix system: error: mkdir: File exists "/run/user". * gnu/services/base.scm (greetd-run-user-activation): Replace mkdir with mkdir-p. Change-Id: I030d1f57c3292c518b3f17061f75258e8a72141c
2025-02-06services: greetd: Add new gtkgreet greeter.muradm
* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record, represents 'gtkgreet' greeter session configuration. * doc/guix.texi (Base Services): Document new 'gtkgreet' greeter. Change-Id: I2e8b5710965faa05795af1d0b2a0e2f774af1d5a Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-02-06services: greetd: Improve greeter configurations.muradm
This improvement focuses on providing common user session scripts for use by multiple greeters. Now user session entry point is factored out into '<greetd-user-session>', which can be reused as is with different greeters. By default it uses 'bash' as first user process. Then user normally starts additional programs with '.profile' or '.bashrc'. Using 'command', 'command-args' and 'extra-env' one can specify something else, which could be 'dbus-session' wrapped process, some desktop environment or else. While the above is possible, one is still encouraged to use '.bashrc', '.profile' or similar. It also fixes incorrect use of 'XDG_RUNTIME_DIR' for 'wlgreet'. 'wlgreet' requires a compositor to run. We provide common sway based greeter script, which can be shared by other graphical greeters. * gnu/services/base.scm (<greetd-user-session>): Common user session factored out, for shared use by multiple greeters. (<greetd-agreety-session>): Switch to common user session. (<greetd-wlgreet-configuration>): Refactor 'wlgreet' configuration. (<greetd-wlgreet-sway-session>): Switch to common user session. (<greetd-terminal-configuration>): Add 'extra-shepherd-requirement' for establishing configurable Shepherd service dependency. * gnu/tests/desktop.scm (%minimal-services): Reflect configuration changes. * doc/guix.texi (Base Services): Document refactoring changes. Change-Id: I9d45a592b355eb9c438be5b1d4d15555ce4956fa Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-01-26services: Add the Shepherd’s ‘transient’ and ‘timer’ to ↵Ludovic Courtès
‘%base-services’. * gnu/services/base.scm (%base-services): Add instances of ‘shepherd-timer-service-type’ and ‘shepherd-transient-service-type’. Change-Id: I28a35d0dce40b142ee71b330b1cf7a3d222ef6bd
2025-01-16services: Switch from mcron + Rottlog to Shepherd’s log rotation.Ludovic Courtès
* gnu/services/admin.scm (unattended-upgrade-log-rotations): Remove. (unattended-upgrade-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/audio.scm (mpd-log-rotation): Remove. (mpd-service-type): Remove ‘rottlog-service-type’ extension. (mympd-log-rotation): Remove. (mympd-service-type): Remove rottlog-service-type’ extension. * gnu/services/base.scm (%guix-publish-log-rotations): Remove. (guix-publish-service-type): Remove ‘rottlog-service-type’ extension. (%base-services): Instantiate ‘log-rotation-service-type’ instead of ‘rottlog-service-type’. (%default-syslog-files): New variable. (syslog-service-type): Extend ‘log-rotation-service-type’. * gnu/services/cuirass.scm (cuirass-log-rotations): Remove. (cuirass-service-type): Remove ‘rottlog-service-type’ extension. (cuirass-remote-worker-log-rotations): Remove. (cuirass-remote-worker-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/file-sharing.scm (%transmission-daemon-log-rotations): Remove. (transmission-daemon-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/linux.scm (%earlyoom-log-rotation): Remove. (earlyoom-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/networking.scm (%ntp-log-rotation): Remove. (ntp-service-type): Remove ‘rottlog-service-type’ extension. (openntpd-service-type): Likewise. (%connman-log-rotation): Remove. (connman-service-type): Remove ‘rottlog-service-type’ extension. (%hostapd-log-rotation): Remove. (hostapd-service-type): Remove ‘rottlog-service-type’ extension. (%pagekite-log-rotation): Remove. (pagekite-service-type): Remove ‘rottlog-service-type’ extension. (%yggdrasil-log-rotation): Remove. (yggdrasil-service-type): Remove ‘rottlog-service-type’ extension. (%ipfs-log-rotation): Remove. (ipfs-service-type): Remove ‘rottlog-service-type’ extension. (%keepalived-log-rotation): Remove. (keepalived-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/web.scm (%hpcguix-web-log-rotations): Remove. (hpcguix-web-service-type): Remove ‘rottlog-service-type’ extension. (%mumi-log-rotations): Remove. (mumi-service-type): Remove ‘rottlog-service-type’ extension. * doc/guix.texi (Log Rotation): Adjust text regarding which one is in ‘%base-services’. Change-Id: I8802d4c2337a1e08e3c084d6217f76527d7ee1fb
2025-01-08services: static-networking: Fail when devices don’t show up.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/71173>. * gnu/services/base.scm (network-set-up/linux): Define ‘max-set-up-duration’ and use it. * gnu/tests/networking.scm (%static-networking-with-nonexistent-device): New variable. (run-static-networking-failure-test): New procedure. (%test-static-networking-failure): New variable. Change-Id: Idba9b36750aa8c6368c8f6d1bc1358066f7432e4
2025-01-08services: static-networking: Run set-up/tear-down as a separate process.Ludovic Courtès
Running that code in PID 1 was fun but it’s not really beneficial and somewhat risky: risk of blocking, file descriptor leak, inability to reload Guile-Netlink in shepherd when it’s upgraded, and so on. This change runs set-up and tear-down as separate processes, which, for the price of one fork(1), buys us peace of mind. * gnu/services/base.scm (network-set-up/hurd, network-tear-down/hurd) (network-tear-down/linux): Use ‘program-file’ instead of ‘scheme-file’. (network-set-up/linux): Likewise, and remove #:blocking? argument to ‘wait-for-link’. Change-Id: Ia41479b50eab31ea40c67243fcb1cffe29ac874a
2024-12-25services: syslog: fix configuration file argument45mg
* gnu/services/base.scm (syslog-shepherd-service): Separate incorrectly combined arguments which resulted in an argument like "-f /etc/syslog.conf" being passed to syslogd, leading it to ignore the argument and execute without a configuration file. Effects of this included no log files being written, though the Shepherd service ran successfully. Ref: https://issues.guix.gnu.org/70677#4-lineno7 Change-Id: I3dbe00eabd4a10804e554c12e1466483c0b185b7 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-23services: syslog: Adjust service for rsyslog compatibility.Jean-Baptiste Note
* gnu/services/base.scm (syslog-shepherd-service): Change flag for designating configuration file. The long option is not compatible with rsyslog while the short is; switch to the short one. Signed-off-by: Ludovic Courtès <ludo@gnu.org>