* gnu/services/base.scm (user-processes-service): Increase the default
value of 'grace-delay'. This leaves more time for processes to clean
up their PID files, /tmp/.X0-lock, etc.
* gnu/services/base.scm (kvm-udev-rule): New procedure.
(udev-service): Use it, and add it to RULES.
(guix-build-accounts): Add "kvm" to the 'supplementary-groups' field.
* gnu/system/shadow.scm (%base-groups): Add "kvm".
* gnu/services/base.scm (swap-service): New procedure.
* gnu/system.scm (<operating-system>)[swap-devices]: New field.
(swap-services): New procedure.
(essential-services): Use it.
* gnu/system/file-systems.scm (<mapped-device-type>): New record type.
(<mapped-device>)[command]: Remove field.
[type]: New field.
* gnu/services/base.scm (device-mapping-service): Rename 'command'
parameter to 'open'. Add 'close' parameter and honor it.
* gnu/system.scm (luks-device-mapping): Rename to...
(open-luks-device): ... this.
(close-luks-device): New procedure.
(luks-device-mapping): New variable.
(device-mapping-services): Get the type of MD, and pass its 'open' and
'close' fields to 'device-mapping-service'.
* gnu/system/file-systems.scm (<mapped-device>): New record type.
* gnu/system.scm (<operating-system>)[mapped-devices]: New field.
(luks-device-mapping): New procedure.
(other-file-system-services)[device-mappings, requirements]: New
procedures. Pass #:requirements to 'file-system-service'.
(device-mapping-services): New procedure.
(essential-services): Use it. Append its result to the return value.
(operating-system-initrd-file): Add comment.
* gnu/services/base.scm (file-system-service): Add #:requirements
parameter and honor it.
(device-mapping-service): New procedure.
* gnu/system/linux-initrd.scm (base-initrd): Add comment.
* gnu/services/base.scm (udev-rules-union): New procedure.
(udev-service): Add #:rules parameter. Call 'udev-rules-union' and
create udev.conf. Set $UDEV_CONFIG_FILE before spawning udevd.
* guix/build/linux-initrd.scm (MS_NOSUID, MS_NODEV, MS_NOEXEC): New
variables.
(mount-flags->bit-mask): New procedure.
(mount-file-system)[flags->bit-mask]: Remove.
Use 'mount-flags->bit-mask' instead.
In /etc/mtab, use the empty string when OPTIONS is false.
* gnu/services/base.scm (file-system-service): Add #:flags parameter and
honor it.
* gnu/system.scm (other-file-system-services): Pass FLAGS to
'file-system-service'.
* gnu/services/base.scm (unicode-start, console-font-service): New
procedures.
(%base-services): Call 'console-font-service' for TTY1 to TTY6.
* gnu/system/install.scm (installation-services): Add comment about the
console font. Call 'console-font-service' for TTY1 to TTY6.
* gnu/services/networking.scm (static-networking-service): Add
#:provision parameter; use it.
* gnu/services/base.scm (%base-services): Call
'static-networking-service' for "lo".
* gnu/services/base.scm (udev-service)[start]: Add 'wait-for-udevd', and
call it before running 'udevadm trigger'. Pass --action=add to
'udevadm trigger'. Call 'udevadm settle' after 'udevadm trigger'.
* gnu/system/shadow.scm (<user-account>)[system?]: New field.
* gnu/system.scm (user-account->gexp): Add it.
* guix/build/activation.scm (add-user): Add #:system? parameter and
honor it.
(activate-users+groups): Handle the 'system?' part of user tuples.
Pass it to 'add-user'. Don't create PROFILE-DIR when SYSTEM? is
true.
* gnu/services/dbus.scm (dbus-service): Add 'system?' field for
"messagebus" account.
* gnu/services/base.scm (guix-build-accounts): Likewise.
* gnu/services/avahi.scm (avahi-service): Likewise.
This partly reverts commit 185f669 ("services: Make sure the store's
group is the build group.")
* gnu/services/base.scm (guix-service)[activate]: Remove 'chown' call.
Add 'id' field to 'user-group' form.
* guix/build/install.scm (directives): Set the store's GID to 30000.
* gnu/services/base.scm (guix-service)[activate]: New variable. Add
'chown' call for (%store-prefix). Set the 'activate' field to
ACTIVATE.
* guix/build/install.scm (directives): Add comment about STORE's group.
* gnu/system/file-systems.scm (<file-system>)[title]: New field.
* gnu/services/base.scm (file-system-service): Add #:title parameter.
In 'start' gexp, use 'canonicalize-device-spec' and honor TITLE.
* gnu/system.scm (other-file-system-services,
operating-system-root-file-system, operating-system-initrd-file):
Adjust accordingly.
* gnu/system/linux-initrd.scm (file-system->spec): Likewise.
* gnu/system/vm.scm (system-disk-image): Add 'title' field for the root
file system.
* guix/build/linux-initrd.scm (mount-file-system): Expect the second
element of SPEC to be the title.
(boot-system)[root-mount-point?, root-fs-type]: Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Select
'canonicalize-device-spec'.
* guix/build/linux-initrd.scm (pidof): New procedure.
(mount-root-file-system)[mark-as-not-killable]: New procedure.
Use it for unionfs when VOLATILE-ROOT?.
* gnu/services/base.scm (%do-not-kill-file): New variable.
(user-processes-service)[stop]: Honor it.
* gnu/services/base.scm (file-system-service): New procedure.
(user-processes-service): Add 'requirements' parameter.
* gnu/services/dmd.scm (dmd-configuration-file): Use (guix build
linux-initrd).
* guix/build/linux-initrd.scm (guix): Export 'check-file-system'.
* gnu/system.scm (file-union): New procedure.
(essential-services): Use it. Add that to the returned list.
* gnu/services/dmd.scm (dmd-configuration-file): Add derivations for
the (guix build syscalls) module, and add that to the load path of
dmd.conf.
* gnu/services/base.scm (root-file-system-service): Rewrite using the
'sync' and 'mount' procedures.
* gnu/services.scm (<service>)[inputs]: Remove.
* gnu/system.scm (links): Remove.
(etc-directory): Add PASSWD and SHADOW to #:inputs.
(operating-system-boot-script): Pass ETC to 'dmd-configuration-file'.
(operating-system-derivation): Remove EXTRAS from the union.
* gnu/system/linux.scm (pam-service->configuration): Rewrite in terms of
'gexp->derivation'. Compute the contents on the build side. Expect
'arguments' to contain a list of gexps.
(pam-services->directory): Rewrite in terms of 'gexp->derivation'.
(unix-pam-service): Change 'arguments' to a list of one gexp.
* gnu/system/shadow.scm (<user-account>)[inputs]: Remove.
[shell]: Change default value to a gexp.
(passwd-file): Rewrite in terms of 'gexp->derivation'. Compute
contents on the build side.
* gnu/services/base.scm (host-name-service, mingetty-service,
nscd-service, syslog-service, guix-service): Change 'start' and 'stop'
to gexps; remove 'inputs' field.
(guix-build-accounts): Change 'shell' field to a gexp.
* gnu/services/networking.scm (static-networking-service): Change
'start' and 'stop' to gexps; remove 'inputs' field.
* gnu/services/xorg.scm (slim-service): Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Expect ETC to be a
derivation. Change 'config' to a gexp. Use 'gexp->file' instead of
'text-file'.
* doc/guix.texi (Defining Services): Update nscd example with gexps, and
without 'inputs'. Add xref to "G-Expressions".
* gnu/services/base.scm (%base-services): New variable.
* gnu/system.scm (<operating-system>)[services]: Change the default
value to %BASE-SERVICES.
* doc/guix.texi (Using the Configuration System): Change
'%standard-services' to '%base-services'.