Suggested by Mark H. Weaver.
* gnu/system/shadow.scm (<user-group>)[system?]: New field.
(%base-groups): Introduce 'system-group' macro, and use it.
* gnu/system.scm (user-group->gexp): Pass the 'system?' field.
* guix/build/activation.scm (add-group): Add #:system? and honor it.
(activate-users+groups): Handle the 'system?' field.
* gnu/system/file-systems.scm (%tty-gid): Choose an ID below 1000.
* doc/guix.texi (User Accounts): Document the 'system?' field.
* 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.
This fixes a bug whereby, if #:allow-root-passwords was #f, 'groupadd'
would ask for a password. This is particularly problematic during
activation.
* gnu/system/linux.scm (rootok-pam-service): New procedure.
(base-pam-services): Use it for all the user* and group* commands.
* 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.
* gnu/system.scm (<operating-system>)[packages]: Change default value to
%BASE-PACKAGES.
(%base-packages): New variable.
* gnu/system/install.scm (installation-os): Use it when defining the
'packages' field.
* doc/guix.texi (Using the Configuration System): Use %BASE-PACKAGES in
example. Remove now unneeded module imports. Explain this.
* 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'.
* gnu/system/vm.scm (system-disk-image)[root-label]: New variable.
Use it for the root file system, and pass it as #:file-system-label to
'qemu-image'.
* guix/build/vm.scm (format-partition): Add #:label parameter, and honor
it.
(initialize-hard-disk): Add #:file-system-label parameter, and pass it
to 'format-partition'.
* gnu/system/vm.scm (qemu-image): Add #:file-system-label parameter and
pass it to 'initialize-hard-disk'.
* guix/build/vm.scm (load-in-linux-vm): When MAKE-DISK-IMAGE?, use
'-drive ...,if=virtio' for better performance.
* gnu/system/vm.scm (qemu-image): Use /dev/vda instead of /dev/sda.
This fixes a circular dependency between (gnu system) and (gnu system
linux-initrd), where the latter could end up being compiled before
'file-system-type' was defined as a macro.
* gnu/system.scm (<file-system>, %fuse-control-file-system,
%binary-format-file-system): Move to...
* gnu/system/file-systems.scm: ... here. New file.
* build-aux/hydra/demo-os.scm, gnu/system/linux-initrd.scm,
gnu/system/vm.scm: Use it.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system/grub.scm (<grub-configuration>): New record type.
(grub-configuration-file): Add 'config' parameter; remove
#:default-entry and #:timeout. Honor CONFIG.
* gnu/system.scm (<operating-system>): Remove 'bootloader-entries'
field; remove default value for 'bootloader' field.
(operating-system-grub.cfg): Pass the 'bootloader' field to
'grub-configuration-file'.
* build-aux/hydra/demo-os.scm (bootloader): New field.
* gnu/system.scm (etc-directory): Change default value of #:profile.
Change contents of SHELLS. Use /run/current-system/profile/{s,}bin in
BASHRC.
(operating-system-boot-script)[%modules]: Add (guix build
linux-initrd). Add call to 'activate-current-system' in gexp.
(operating-system-initrd-file, operating-system-grub.cfg): New
procedures.
(operating-system-derivation): Don't build grub.cfg here and remove it
from the file union.
* gnu/system/vm.scm (qemu-image): Remove #:populate.
(operating-system-build-gid, operating-system-default-contents):
Remove.
(system-qemu-image): Remove call to
'operating-system-default-contents'. Use 'operating-system-grub.cfg'
to get grub.cfg. Add GRUB.CFG to #:inputs.
(system-qemu-image/shared-store): Likewise, but don't add GRUB.CFG to
#:inputs.
(system-qemu-image/shared-store-script): Pass --system kernel option.
* guix/build/activation.scm (%booted-system, %current-system): New
variables.
(boot-time-system, activate-current-system): New procedures.
* guix/build/install.scm (evaluate-populate-directive): Add case
for ('directory name uid gid mode).
(directives, populate-root-file-system): New procedures.
* guix/build/vm.scm (initialize-hard-disk): Replace calls to
'evaluate-populate-directive' by a call to
'populate-root-file-system'.
* gnu/services/dmd.scm (dmd-configuration-file): Use
/run/current-system/profile/bin.
* gnu/services/xorg.scm (slim-service): Likewise.