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>
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>
* 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
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
* 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>
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
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>
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>
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
* 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
* 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>
* 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>
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>
* 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>
* 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>
* 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>
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>
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>
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
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
* 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>
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>
`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>
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>
* 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
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
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>
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
* 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
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
* gnu/services/sound.scm (speakersafetyd-configuration) [log-file]: New field.
(speakersafetyd): Use it via #:log-file.
Change-Id: I870bc7bfd69249da3a9c981f627e751395386bd2
* 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
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
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