/doc/

00514445e0'>treecommitdiff
path: root/gnu/services.scm
AgeCommit message (Collapse)Author
2017-07-11services: Make error message less scary.Ludovic Courtès
* gnu/services.scm (service-back-edges): Show the type name of SERVICE instead of SERVICE in error message.
2017-05-03ui: Rename '_' to 'G_'.Ludovic Courtès
This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-04-16services: Service types can now specify a default value for instances.Ludovic Courtès
* gnu/services.scm (&no-default-value): New variable. (<service-type>)[default-value]: New field. (<service>): Rename constructor from 'service' to 'make-service'. (service): New macro. (%service-with-default-value): New procedure. (&missing-value-service-error): New error condition. * tests/services.scm ("services, default value"): New test. * doc/guix.texi (Service Types and Services): Document 'default-value'. (Service Reference): Explain default values.
2017-04-16services: 'service-parameters' becomes 'service-value'.Ludovic Courtès
* gnu/services.scm (<service>)[parameters]: Rename to... [value]: ... this. Change calls to 'service-parameters' to 'service-value'. * gnu/system.scm, gnu/tests/base.scm, guix/scripts/system.scm, tests/services.scm: Likewise. * doc/guix.texi (Service Reference): Adjust accordingly.
2017-04-13services: Define '%linux-bare-metal-service' using 'simple-service'.Ludovic Courtès
* gnu/services.scm (linux-bare-metal-service-type): Remove. (%linux-bare-metal-service): Define in terms of 'simple-service'.
2017-03-10services: Create /var/log upon activation.Christopher Baines
When launching a container created with guix system container, the attempt to create /var/log/wtmp would fail, as /var/log did not exist. * gnu/services.scm (activation-script): Create /var/log Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-02-08services: Add 'special-files-service-type'.Ludovic Courtès
* gnu/build/activation.scm (activate-/bin/sh): Remove. (activate-special-files): New procedure. * gnu/services.scm (activation-script): Remove call to 'activate-/bin/sh'. (special-files-service-type): New variable. (extra-special-file): New procedure. * gnu/services/base.scm (%base-services): Add SPECIAL-FILES-SERVICE-TYPE instance. * gnu/tests/base.scm (run-basic-test)[special-files]: New variables. ["special files"]: New test.
2017-01-24services: Create /var/log/wtmp upon activation.Ludovic Courtès
This fixes a bug whereby /var/log/wtmp would never be created, and thus accounting information would be lost. * gnu/services.scm (activation-script): Create /var/log/wtmp. * gnu/tests/base.scm (run-basic-test)["wtmp entry"]: New test.
2017-01-19services: Create /var/run/utmpx upon activation.Ludovic Courtès
This fixes a bug whereby /var/run/utmpx would never be created, and thus accounting information would be missing. * gnu/services.scm (activation-script): Create /var/run/utmpx. * gnu/tests/base.scm (run-basic-test)["utmpx entry"]: New test.
2017-01-16services: Export 'service-extension' procedures.Christopher Baines
* gnu/services.scm: Export service-extension-target and service-extension-compute. This allows for greater extensiblity of services by enabling service extensions to be wrapped. For example, the parameters passed to the compute function can be modified, or the return value of the compute function can be modified. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-12-11services: Activate system prior to services.Christopher Baines
* gnu/services.scm (activation-script): Move 'activation-current-system' call before (for-each primitive-load …). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-09-20services: Use 'source-module-closure' for (gnu build activation).Ludovic Courtès
* gnu/services.scm (activation-script)[%modules]: Remove. Use 'source-module-closure' instead.
2016-09-19services: Add 'simple-service'.Ludovic Courtès
* gnu/services.scm (simple-service): New procedure. * doc/guix.texi (Service Reference): Document it.
2016-07-12gnu: Use 'gexp->file' in conjunction with 'with-imported-modules'.Ludovic Courtès
* gnu/services.scm (activation-script): Remove code to set '%load-path' and use 'with-imported-modules' instead. (cleanup-gexp): Likewise. * gnu/system/vm.scm (%vm-module-closure): New variable. (expression->derivation-in-linux-vm): Remove #:modules. [loader]: Remove code to set '%load-path'. [builder]: Use %VM-MODULE-CLOSURE. (qemu-image): Use 'with-imported-modules'.
2016-07-12gnu: Switch to 'with-imported-modules'.Ludovic Courtès
* gnu/services.scm (directory-union): Use 'with-imported-modules' instead of the '#:modules' argument of 'computed-file'. * gnu/services/base.scm (udev-rules-union): Likewise. * gnu/services/dbus.scm (system-service-directory): Likewise. * gnu/services/desktop.scm (wrapped-dbus-service): (polkit-directory): Likewise. * gnu/services/networking.scm (tor-configuration->torrc): Likewise. * gnu/services/xorg.scm (xorg-configuration-directory): Likewise. * gnu/system/install.scm (self-contained-tarball): Likewise. * gnu/system/linux-container.scm (container-script): Likewise. * gnu/system/linux-initrd.scm (expression->initrd): Likewise, and remove #:modules parameter. (flat-linux-module-directory): Use 'with-imported-modules'. (base-initrd): Likewise. * gnu/system/locale.scm (locale-directory): Likewise. * gnu/system/shadow.scm (default-skeletons): Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise. * gnu/tests/base.scm (run-basic-test): Likewise. * gnu/tests/install.scm (run-install): Likewise. * doc/guix.texi (Initial RAM Disk): Update 'expression->initrd' documentation.
2016-06-20services: Add 'gc-root-service-type'.Ludovic Courtès
* gnu/services.scm (gc-roots->system-entry): New procedure. (gc-root-service-type): New variable.
2016-03-15doc: Clarify and consolidate modify-services documentation.Chris Marusich
* doc/guix.texi ("Using the Configuration System"): Move the example... ("Service Reference"): ...to here, and clarify more. * gnu/services.scm (modify-services): Update docstring to mention the return type. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-03-07services: Use 'packages->manifest' in 'packages->profile-entry'.宋文武
This allows using (PACKAGE OUTPUT) in the packages field. Reported by Jan Nieuwenhuizen <janneke@gnu.org>. * gnu/services.scm (packages->profile-entry): Use 'packages->manifest'.
2016-02-08file-systems: Spawn a Bournish REPL upon fsck failure.Ludovic Courtès
Fixes <http://bugs.gnu.org/22588>. Reported by Mark H Weaver <mhw@netris.org>. * gnu/build/file-systems.scm (check-file-system): Pass %BOURNISH-LANGUAGE as the argument to 'start-repl'. * gnu/services.scm (activation-script): Add (guix build bournish). * gnu/services/base.scm (file-system-shepherd-service)[imported-modules]: Likewise. * gnu/system/linux-container.scm (container-script): Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2016-02-03services: 'file-union' makes sure each source file exists.Ludovic Courtès
Before that, specifying an invalid timezone in 'operating-system' would lead to a dangling symlink in the 'etc' directory, which in turn would lead to a kernel panic at boot time. Reported by pizzaiolo on #guix. * gnu/services.scm (file-union): Add 'stat' call for SOURCE.
2016-01-29services: Rename 'dmd' services to 'shepherd'.Alex Kost
* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service) (dmd-service-type, <dmd-service>, dmd-service, dmd-service?) (make-dmd-service, dmd-service-documentation, dmd-service-provision) (dmd-service-requirement, dmd-service-respawn, dmd-service-start) (dmd-service-stop, dmd-service-auto-start?, dmd-service-modules) (dmd-service-imported-modules, dmd-service-file-name, dmd-service-file) (dmd-service-back-edges): Rename to... (shepherd-root-service-type, %shepherd-root-service, shepherd-service-type) (<shepherd-service>, shepherd-service, shepherd-service?) (make-shepherd-service, shepherd-service-documentation) (shepherd-service-provision, shepherd-service-requirement) (shepherd-service-respawn, shepherd-service-start) (shepherd-service-stop, shepherd-service-auto-start?) (shepherd-service-modules, shepherd-service-imported-modules) (shepherd-service-file-name, shepherd-service-file) (shepherd-service-back-edges): ...this * gnu/services.scm: Adjust comments. * gnu/services/avahi.scm (avahi-dmd-service): Rename to... (avahi-shepherd-service): ... this. * gnu/services/base.scm (%root-file-system-dmd-service) (file-system->dmd-service-name, mapped-device->dmd-service-name) (dependency->dmd-service-name, file-system-dmd-service) (mingetty-dmd-service, nscd-dmd-service, guix-dmd-service) (guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to... (%root-file-system-shepherd-service) (file-system->shepherd-service-name, mapped-device->shepherd-service-name) (dependency->shepherd-service-name, file-system-shepherd-service) (mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service) (guix-publish-shepherd-service, udev-shepherd-service) (gpm-shepherd-service): ... this. * gnu/services/databases.scm (postgresql-dmd-service): Rename to... (postgresql-shepherd-service): ... this. * gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service): Rename to... (upower-shepherd-service, elogind-shepherd-service): ... this. * gnu/services/dbus.scm (dbus-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/lirc.scm (lirc-dmd-service): Rename to... (lirc-shepherd-service): ... this. * gnu/services/mail.scm (dovecot-dmd-service): Rename to... (dovecot-shepherd-service): ... this. * gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service) (bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/ssh.scm (lsh-dmd-service): Rename to... (lsh-shepherd-service): ... this. * gnu/services/web.scm (nginx-dmd-service): Rename to... (nginx-shepherd-service): ... this. * gnu/services/xorg.scm (slim-dmd-service): Rename to... (slim-shepherd-service): ... this. * gnu/system.scm (essential-services): Use '%shepherd-root-service'. * gnu/system/install.scm (cow-store-service-type): Adjust accordingly. * guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type) (export-dmd-graph): Likewise. * tests/guix-system.sh: Likewise. * tests/services.scm ("dmd-service-back-edges"): Rename to... ("shepherd-service-back-edges"): Adjust accordingly. * doc/guix.texi: Likewise. * doc/images/service-graph.dot: Use 'shepherd' service name.
2016-01-06services: cleanup-service: Catch 'system-error' instead of everything.Ludovic Courtès
This makes sure that critical errors such as unbound-variable do not go undetected. * gnu/services.scm (cleanup-gexp): Introduce local 'fail-safe' macro and use it. Remove uses of 'false-if-exception'.
2016-01-05services: Move /tmp cleanup to a separate service.Ludovic Courtès
* gnu/services.scm (compute-boot-script): Remove /tmp and /var/run deletion code from here. (cleanup-gexp): New procedure with /tmp and /var/run deletion code formerly in 'compute-boot-script'. (cleanup-service-type): New variable. * gnu/system.scm (essential-services): Add an instance of CLEANUP-SERVICE-TYPE.
2016-01-05services: boot: Reinstate /tmp and /var/run deletion.Ludovic Courtès
For some time /tmp and /var/run were not being deleted because 'delete-file-recursively' was unbound. * gnu/services.scm (compute-boot-script)[%modules, modules, compiled]: New variables. Use them to augment the module search path.