summaryrefslogtreecommitdiff
path: root/gnu/services.scm
AgeCommit message (Collapse)Author
2020-07-01services: provenance: Save channel introductions.Ludovic Courtès
* gnu/services.scm (channel->code): Include CHANNEL's introduction, if any, unless CHANNEL is the singleton %DEFAULT-CHANNELS. (channel->sexp): Add comment. * guix/scripts/system.scm (sexp->channel): Change pattern to allow for extensibility.
2020-06-08gnu: services: Add %hurd-startup-service.Jan (janneke) Nieuwenhuizen
This decouples startup of the Hurd from the "hurd" package, moving the RC script into SYSTEM. * gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script. [arguments]: Do not substitute it. Update "runsystem.sh" to parse kernel arguments and exec into --system=SYSTEM/rc. (hurd-rc-script): Move to... * gnu/services.scm (%hurd-rc-file): ...this new variable. (hurd-rc-entry): New procedure. (%hurd-startup-service): Use it in new variable. * gnu/system.scm (hurd-default-essential-services): Use it.
2020-06-08system: examples: Add bare-hurd.tmpl.Jan (janneke) Nieuwenhuizen
* gnu/system/hurd.scm (%hurd-def%hurd-default-operating-system-kernel, %hurd-default-operating-system): New exported variables. * gnu/system/examples/bare-hurd.tmpl: New file. * Makefile.am (EXAMPLES): Add it. * tests/guix-system.sh: Add --target=i586-pc-gnu when testing it.
2020-04-26services: system: Initial entries are non-monadic.Ludovic Courtès
* gnu/system.scm (operating-system-directory-base-entries): Return a regular, non-monadic value. * gnu/services.scm (system-derivation): Adjust accordingly. * gnu/system/linux-container.scm (container-essential-services): Likewise.
2020-04-26services: profile: Use a declarative profile.Ludovic Courtès
* gnu/services.scm (packages->profile-entry): Use 'profile' instead of 'profile-derivation'.
2020-04-21services: etc: Detect and report duplicate entries.Ludovic Courtès
Fixes <https://bugs.gnu.org/40729>. Reported by Christopher Baines <mail@cbaines.net>. * gnu/services.scm (files->etc-directory)[assert-no-duplicates]: New procedure. Use it.
2020-04-05services: Allow modprobe to use "/etc/modprobe.d".Brice Waegeneire
* gnu/services.scm (%modprobe-wrapper): Set 'MODPROBE_OPTIONS' environment variable. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-04-02services: Accumulate builds for 'system' entries.Ludovic Courtès
That way, more build requests are accumulated when running "guix system build". * gnu/services.scm (system-derivation): Use 'mapm/accumulate-builds' rather than 'sequence'.
2019-12-07services: Add 'provenance-service-type'.Ludovic Courtès
* gnu/services.scm (object->pretty-string) (channel->code, channel->sexp, provenance-file) (provenance-entry): New procedures. (provenance-service-type): New variable. * gnu/system.scm (operating-system-with-provenance): New procedure. * doc/guix.texi (Service Reference): Document 'provenance-service-type'.
2019-11-09services: 'fold-services' memoizes service values.Ludovic Courtès
Previously 'fold-services' could end up traversing the same services in the graph several times, which is what this change addresses. The hit rate on the 'add-data-to-store' cache goves from 9% to 8% on "guix system build desktop.tmpl -nd", and the number of lookups in that cache goes from 4458 to 4383. * gnu/services.scm (fold-services): Turn 'loop' into a monadic procedure in %STATE-MONAD and use it to memoize values of visited services.
2019-08-14remote: Remove '--system' argument.Jakob L. Kreuze
* gnu/services.scm (activation-script): Return a <program-file> rather than a <scheme-file>. * gnu/deploy.scm (guix-deploy): Remove handling for '--system'. (show-help): Remove documentation for '--system'. (%default-options): Remove default setting for 'system'.
2019-05-10services: 'gc-root-service-type' now has a default value.Ludovic Courtès
* gnu/services.scm (gc-root-service-type)[default-value]: New field.
2018-09-07services: 'instantiate-missing-services' reaches fixed point.Ludovic Courtès
Fixes a bug whereby services indirectly depended on would not be automatically instantiated. * gnu/services.scm (instantiate-missing-services): Loop back when the length of ADJUSTED is greater than that of INSTANCES. * tests/services.scm ("instantiate-missing-services, indirect"): New test.
2018-06-20services: boot: Take gexps instead of monadic gexps.Ludovic Courtès
* gnu/services.scm (compute-boot-script): Rename 'mexps' to 'gexps' and remove 'mlet' form. (boot-service-type): Update comment. (cleanup-gexp): Remove 'with-monad' and 'return'. (activation-script): Rewrite in non-monadic style: use 'scheme-file' instead of 'gexp->file'. (gexps->activation-gexp): Remove 'mlet', return a gexp. * gnu/services/shepherd.scm (shepherd-boot-gexp): Remove 'with-monad' and 'return'. * gnu/system.scm (operating-system-boot-script): Remove outdated comment. * gnu/tests/base.scm (%cleanup-os): For 'dirty-service', remove 'with-monad' and 'return'.
2018-06-20services: Add description to core services.Ludovic Courtès
* gnu/services.scm (system-service-type, boot-service-type) (cleanup-service-type, activation-service-type) (special-files-service-type, etc-service-type) (setuid-program-service-type, profile-service-type) (firmware-service-type, gc-root-service-type): Add 'description' field.
2018-06-20services: cleanup: Expect file names to be UTF-8-encoded.Ludovic Courtès
Fixes <https://bugs.gnu.org/26353>. Reported by Danny Milosavljevic <dannym@scratchpost.org>. * gnu/services.scm (cleanup-gexp): Add 'setenv' and 'setlocale' calls before 'delete-file-recursively'. * gnu/tests/base.scm (%cleanup-os, %test-cleanup): New variables. (run-cleanup-test): New procedure.
2018-06-20services: boot: Reverse the order of boot expressions.Ludovic Courtès
* gnu/services.scm (compute-boot-script): Reverse MEXPS. * gnu/system.scm (essential-services): Reverse order of %SHEPHERD-ROOT-SERVICE, %ACTIVATION-SERVICE, and CLEANUP-SERVICE-TYPE.
2018-04-08discovery: Remove dependency on (guix ui).Ludovic Courtès
This reduces the closure of (guix discovery) from 28 to 8 modules. * guix/discovery.scm (scheme-files): Use 'format' instead of 'warning'. (scheme-modules): Add #:warn parameter. Use it instead of 'warn-about-load-error'. (fold-modules): Add #:warn and pass it to 'scheme-modules'. (all-modules): Likewise. * gnu/bootloader.scm (bootloader-modules): Pass #:warn to 'all-modules'. * gnu/packages.scm (fold-packages): Likewise. * gnu/services.scm (all-service-modules): Likewise. * guix/upstream.scm (importer-modules): Likewise.
2018-03-29gnu: Refactor boot-service-type and activation-service-type.Chris Marusich
* gnu/services.scm (boot-service-type) <compose>: Use the "identity" procedure instead of the "append" procedure because it more accurately reflects the intent, which is to simply return the single list of extensions to which fold-services applies the "compose" procedure. (activation-service-type) <compose>: Likewise.
2018-01-21services: Missing services are automatically instantiated.Ludovic Courtès
This simplifies OS configuration: users no longer need to be aware of what a given service depends on. See the discussion at <https://lists.gnu.org/archive/html/guix-devel/2018-01/msg00114.html>. * gnu/services.scm (missing-target-error): New procedure. (service-back-edges): Use it. (instantiate-missing-services): New procedure. * gnu/system.scm (operating-system-services): Call 'instantiate-missing-services'. * tests/services.scm ("instantiate-missing-services") ("instantiate-missing-services, no default value"): New tests. * gnu/services/version-control.scm (cgit-service-type)[extensions]: Add FCGIWRAP-SERVICE-TYPE. * gnu/tests/version-control.scm (%cgit-os): Remove NGINX-SERVICE-TYPE and FCGIWRAP-SERVICE-TYPE instances. * doc/guix.texi (Log Rotation): Remove 'mcron-service-type' in example. (Miscellaneous Services): Remove 'nginx-service-type' and 'fcgiwrap-service-type' in Cgit example.
2017-12-17services: cleanup: Remove "/run/udev/watch.old" directory.Danny Milosavljevic
* gnu/services.scm (cleanup-gexp): Remove "/run/udev/watch.old" directory.
2017-11-08services: Add 'lookup-service-types'.Ludovic Courtès
* gnu/services.scm (lookup-service-types): New procedure. * tests/services.scm ("lookup-service-types"): New test.
2017-11-08services: 'fold-service-types' includes (gnu services).Ludovic Courtès
* gnu/services.scm (all-service-modules): New procedure. (fold-service-types): Use it for the default MODULES value.
2017-11-08services: 'fold-service-types' honors its seed.Ludovic Courtès
* gnu/services.scm (fold-service-types): Use SEED instead of '().
2017-10-22gexp: Add 'directory-union'.Ludovic Courtès
* gnu/services.scm (directory-union): Move to... * guix/gexp.scm (directory-union): ... here. New procedure. * doc/guix.texi (G-Expressions): Document it.
2017-10-22gexp: Add 'file-union'.Ludovic Courtès
* gnu/services.scm (file-union): Move to... * guix/gexp.scm (file-union): ... here. New procedure. * doc/guix.texi (G-Expressions): Document it.
2017-10-12services: cleanup: Remove Shadow lock files from /etc.Ludovic Courtès
Partly fixes <https://bugs.gnu.org/28772>. Reported by Oleg Pykhalov <go.wigust@gmail.com>. * gnu/services.scm (cleanup-gexp): Remove /etc/{passwd,group}.lock and /etc/.pwd.lock.
2017-09-22services: network-manager: Add support for VPN plug-ins.Ludovic Courtès
* gnu/services.scm (directory-union): Export. * gnu/services/networking.scm (<network-manager-configuration>)[vpn-plugins]: New field. (vpn-plugin-directory, network-manager-environment): New procedure. (network-manager-shepherd-service): Pass #:environment-variables to 'make-forkexec-constructor'. (network-manager-service-type): Add SESSION-ENVIRONMENT-SERVICE-TYPE extension. * doc/guix.texi (Networking Services): Document it.
2017-09-16services: Add 'fold-service-types'.Ludovic Courtès
* gnu/services.scm (%distro-root-directory, %service-type-path): New variables. (fold-service-types): New procedure.
2017-09-16services: Add a description and location for each service type.Ludovic Courtès
* gnu/services.scm (<service-type>)[description, location]: New field. * doc/guix.texi (Service Types and Services): Document 'description'.
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.