* gnu/home.scm (%base-home-services): New variable.
(<home-environment>)[services]: Change default to ‘%base-home-services’.
* guix/scripts/home/import.scm (manifest+configuration-files->code): Use
‘%base-home-services’ by default.
* tests/home-import.scm (match-home-environment-no-services)
(match-home-environment-transformations)
(match-home-environment-no-services-nor-packages)
(match-home-environment-bash-service)
(match-home-environment-bash-service-with-alias): Adjust accordingly.
* doc/he-config-bare-bones.scm: Use ‘%base-home-services’.
* doc/guix.texi (Declaring the Home Environment): Add index entry for
‘%base-home-services’.
Change-Id: Id95ede62b97a976aad138bfc4b63fc0bdf37c7de
* gnu/home/services/admin.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Shepherd Home Service): Document it.
Change-Id: I37ac171147c236b05d6d3b226e9072ab7524dfe9
This is a semi-incompatible change: gexps previously provided in the
‘schedule’ field will no longer work.
* gnu/services/admin.scm (unattended-upgrade-mcron-jobs): Rename to…
(unattended-upgrade-shepherd-services): … this. Return a list of one
Shepherd service. Remove custom logging and time limitation facilities
from ‘code’.
(unattended-upgrade-service-type): Extend ‘shepherd-root-service-type’
instead of ‘mcron-service-type’.
(<unattended-upgrade-configuration>)[services-to-restart]: Change
default.
* doc/guix.texi (Unattended Upgrades): Adjust ‘schedule’ and
‘services-to-restart’ documentation.
Change-Id: I1b239c5946e71cf9e2af9b24fe4b01366b57fb7a
This is a semi-incompatible change: gexps previously provided in the
‘schedule’ field will no longer work.
* gnu/services/admin.scm (log-cleanup-mcron-jobs): Remove.
(log-cleanup-shepherd-services): New procedure.
(log-cleanup-service-type): Extend SHEPHERD-ROOT-SERVICE-TYPE instead of
MCRON-SERVICE-TYPE.
* doc/guix.texi (Log Rotation): Adjust ‘schedule’ documentation
accordingly.
Change-Id: I2a3beb7dffbc9992b714a29423674db9c7dc6cab
* gnu/services/admin.scm (%default-log-rotation-calendar-event): New
variable.
(<log-rotation-configuration>): New record type.
(log-rotation-shepherd-services): New procedure.
(log-rotation-service-type): New variable.
Change-Id: I4400035f3b6065ec147ac932110b690120d739c2
This allows using Unbound as a local DNSSEC-enabled resolver. This
commit also allows configuration of the Unbound DNS resolver via a
Scheme API. The API currently provides very common options and
includes an escape hatch to enable less common configurations.
* gnu/service/dns.scm (unbound-serialize-field): New procedure.
(unbound-serialize-alist, unbound-serialize-section)
(unbound-serialize-string, unbound-serialize-boolean)
(unbound-serialize-list-of-strings): New procedures.
(unbound-zone): New record type.
(unbound-serialize-unbound-zone)
(unbound-serialize-list-of-unbound-zone): New procedures.
(unbound-remote): New record type.
(unbound-serialize-unbound-remote): New procedure.
(unbound-server): New record type.
(unbound-serialize-unbound-server): New procedure.
(unbound-configuration): New record type.
(unbound-config-file, unbound-shepherd-service): New procedures.
(unbound-account-service): New variable.
(unbound-service-type): New services.
* gnu/tests/dns.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (DNS Services): Document it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I4c9646c9e17d4882e596d33ff8f738e1877fa1ae
* doc/guix-cookbook.texi (Build system arguments)
Remove recommendation on phase return value.
Ensure code examples can run and are up-to-date.
Change-Id: I143babf79983751578d6d4e20b20195ea000656d
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Sometimes you would want to skip on actually installing the podman package in
order to save disk space and bandwidth. Even without installing it globally,
podman can still be fetched via guix shell when required.
* gnu/services/containers.scm (package-or-#f?): New procedure.
(rootless-podman-configuration)<podman>: Change type to package-or-#f.
(rootless-podman-service-profile): Produce empty list if not podman package.
* doc/guix.texi (Miscellaneous Services): Document the change.
Change-Id: If533d913ea190558ce7e206d98ada4d805270594
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Allow users to have multiple dnsmasq instances by specifying different
`provision` values for the corresponding Shepherd services, similar to
what is done with `static-networking-service-type`.
* gnu/services/dns.scm (<dnsmasq-configuration>)[provision]: new option.
(dnsmasq-shepherd-service): Use supplied provision value.
* doc/guix.texi (DNS Services)[dnsmasq-configuration]: Document it.
Change-Id: I78c7f015cb1db239a600bc5373b2fd80e8b9b9f4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Particularly to cover the case where things might need to happen with the
build farms if changes are reverted.
* doc/contributing.texi (Commit Access): Add guidance on reverting commits.
Change-Id: Iba320b76b0927b693c75054b5473a50bdd77c7ee
Allow the user to specify scripts to be added into Elogind's hook
directories. These scripts will be run before/after
suspend/hibernate/poweroff/reboot.
Also allow setting the associated config options.
* gnu/services/desktop.scm (elogind-configuration): add
`system-sleep-hook-files`, `system-shutdown-hook-files`,
and 4 new config options.
(elogind-configuration-file): Add entries for the new config options
under the `[Sleep]` section.
(elogind-etc-directory): New procedure.
(elogind-service-type): Extend `etc-service-type` using `/etc/elogind`.
* doc/guix.texi (Desktop Services): Document the new options.
Change-Id: I7e22cbaa9d031049b9d085ba0ce4cc8a8b4f16ff
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The default value of #f for the ‘file-system’ field is invalid and would
trigger a type error when running ‘guix system search’.
* gnu/services/admin.scm (<resize-file-system-configuration>)[file-system]:
Remove default value.
(resize-file-system-service-type)[default-value]: Remove.
* doc/guix.texi (Miscellaneous Services): Adjust accordingly.
Change-Id: If73f8923f49d38827059ba98bd53636a7f3917fe
This allows rebooting straight into the new system with ‘reboot -k’.
* guix/scripts/system/reconfigure.scm (kexec-loading-program)
(load-system-for-kexec): New procedures.
* gnu/tests/reconfigure.scm (run-kexec-test): New procedure.
(%test-upgrade-kexec): New variable.
* guix/scripts/system.scm (perform-action): Add #:load-for-kexec?.
Call ‘load-system-for-kexec’.
(show-help, %options): Add ‘--no-kexec’.
(%default-options): Add ‘load-for-kexec?’.
(process-action): Honor it and pass it to ‘perform-action’.
* gnu/machine/ssh.scm (deploy-managed-host): Add call to
‘load-system-for-kexec’.
* doc/guix.texi (Invoking guix system): Document it.
Change-Id: I86d11f1c348e4359bc9e73c86e5aebff60fe875c
* gnu/services/base.scm (<syslog-configuration>): Add extra-options field.
(syslog-shepherd-service): Use it when running the service.
* doc/guix.texi: Document it.
Change-Id: I540d070b9a9678b45ec9fa28d6fdc761f9b3fd9a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/services/containers.scm: New file;
(rootless-podman-configuration): new variable;
(rootless-podman-service-subids): new variable;
(rootless-podman-service-accounts): new variable;
(rootless-podman-service-profile): new variable;
(rootless-podman-shepherd-services): new variable;
(rootless-podman-service-etc): new variable;
(rootless-podman-service-type): new variable.
* gnu/local.mk: Test it.
* gnu/local.mk: Add them.
* doc/guix.texi (Miscellaneous Services): Document it.
Change-Id: I041496474c1027da353bd6852f2554a065914d7a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit adds a Guix System service to handle allocation of subuid
and subgid requests. Users that don't care can just add themselves as a
subid-range and don't need to specify anything but their user name.
Users that care about specific ranges, such as possibly LXD, can specify
a start and a count.
* doc/guix.texi (Miscellaneous Services): Document it.
* gnu/build/activation.scm (activate-subuids+subgids): New variable.
* gnu/local.mk: Add gnu/tests/shadow.scm.
* gnu/system/accounts.scm (sexp->subid-range): New variable.
* gnu/system/shadow.scm (%root-subid): New variable;
(subids-configuration): new record;
(subid-range->gexp): new variable;
(assert-valid-subids): new variable;
(delete-duplicate-ranges): new variable;
(subids-activation): new variable;
(subids-extension): new record;
(append-subid-ranges): new variable;
(subids-extension-merge): new variable;
(subids-service-type): new variable.
* gnu/tests/shadow.scm (subids): New system test.
Change-Id: I3755e1c75771220c74fe8ae5de1a7d90f2376635
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* doc/guix.texi Add note on nsncd in Name Service Switch section.
Change-Id: Ib804ab2e7d83d13f8f81d875f957eae2304eb232
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The database contains some tables that are effectively used for configuration.
This commit starts to expose these to the guix service, enabling the
configuration to be handled by the service.
* gnu/services/guix.scm (<guix-data-service-configuration>): Add
git-repositories and build-servers.
(guix-data-service-configuration-git-repositories,
guix-data-service-configuration-build-servers): New procedures.
(guix-data-service-shepherd-services): Add new shepherd service to setup the
database.
Change-Id: I519efd9157b60f18c7e80e3bdc92c0e3c5729334
For auto-login on systems with elogind, dbus-system needs to be started. This
commit adds ability to express that ordering.
* gnu/services/base.scm (<mingetty-configuration>): Add shepherd-requirement
field.
(mingetty-shepherd-service): Use it.
* doc/guix.texi (Base Services)<mingetty-configuration>: Document it.
Change-Id: Iedbdc4375180740379d561aa193d7c63350d2e7b
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Not all aspects of mingetty were configurable, so this commit adds the
additional configuration fields to support that.
* gnu/services/base.scm (<mingetty-configuration>): Add delay, print-issue,
print-hostname, nice, working-directory, root-directory fields.
(mingetty-shepherd-service): Use the new fields.
(define-module)<#:export>: Export the new accessors.
* doc/guix.texi (Base Services)<mingetty-configuration>: Document the
additional field.
Change-Id: I4557a82498805ade0b341feda9d33eccc305690f
* doc/guix.texi (Build Systems): Add documentation for
changed #:configure-flags and new #:backend-path.
Change-Id: Ic8be598ea52ae04230b1e61c329ee55ccbb5dd63
This ensures the unattended upgrade job successfully reboots regardless of the
value for services-to-restart. Previously the mcron service may be restarted
which would halt script execution before the system rebooted.
* gnu/services/admin.scm (unattended-upgrade-mcron-jobs): Do not restart
services when reboot? is #t.
* doc/guix.texi (Unattended Upgrades): Document it.
Change-Id: I8e486a764ec1dc5c3090130cc447a0cc3f5a2e00
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
In order to support more flexibility in Wireguard configuration, ungexp the
configuration fields directly instead of ungexp-splicing a sexp
calculator. This allows for the fields to take arbitrary gexps instead of only
strings which is particularly helpful for the Pre/Post Up/Down commands.
* gnu/services/vpn.scm (wireguard-configuration-file): Ungexp configuration
lists instead of ungexp-splicing the code surrounding them.
* doc/guix.texi (VPN Services)[wireguard]: Document it.
Change-Id: If074cbb78473b6fd34e0e4e990d2ed268001d6c7
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
The syntax from using the private-key field is more convenient than writing a
custom PreUp command (more formatting and preshared keys). Instead of trying
to guess if private-key is/is not a file path, add an option to disable
bootstrapping while still using private-key.
* gnu/services/vpn.scm (<wireguard-configuration>): Add
bootstrap-private-key?.
(wireguard-activation): Check bootstrap-private-key? before bootstrapping.
* doc/guix.texi (VPN Services)[wireguard]: Document it.
Change-Id: I6ba71ad58b26743057a221a54a246369022f83a5
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Users who retrieve the private-key via a PreUp field need to be able to
disable the default retrieval mechanism.
* gnu/services/vpn.scm (<wireguard-configuration>)[private-key]: Change
comment.
(wireguard-configuration-file): Conditionally serialize private-key.
* gnu/services/vpn.scm (wireguard-activation): Do not create private-key if
the field is #f.
* doc/guix.texi (VPN Services)[wireguard-configuration]: Document it.
Change-Id: Iac419809ae94eb76e97ff1f1749e2f4b3e65bb04
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* doc/contributing.texi(Sending a Patch Series): Add a note about
`git format-patch` revision format and link to git documentation.
Change-Id: Ie08f85dc19e3804165fb184664b74e85a804d7c4
Commit eee95b5a87 changed package
rewriting to ignore hidden packages. This patch permits the previous use
by adding an option to rewrite hidden packages.
* guix/packages.scm (package-input-rewriting/spec)[rewrite]: When P is
hidden, return it as-is unless #:replace-hidden? has been enabled.
* tests/packages.scm ("package-input-rewriting/spec, replace hidden
package"): New test.
* doc/guix.texi (Defining Package Variants): Update.
Change-Id: I0a7988cac70e0c6b88b0fe6e27c1036fa723e030
Signed-off-by: Ludovic Courtès <ludo@gnu.org>