Partly fixes <http://bugs.gnu.org/20720>.
Reported by Alex Kost <alezost@gmail.com>.
* gnu/system.scm (default-/etc/hosts): Change 'text-file' to 'plain-file'.
(maybe-file->monadic): New procedure.
(operating-system-etc-directory): Use it.
* doc/guix.texi (operating-system Reference, Networking Services): Adjust
accordingly.
Partly fixes <http://bugs.gnu.org/20720>
Reported by Alex Kost <alezost@gmail.com>.
* gnu/system.scm (etc-directory): Change default #:sudoers value to a
'plain-file'. Don't bind it. Remove #~#$.
(maybe-string->file): New procedure.
(operating-system-etc-directory): Use it.
(%sudoers-specification): Use 'plain-file'.
* doc/guix.texi (operating-system Reference): Adjust accordingly.
* gnu/system/shadow.scm (%base-user-accounts): New variable.
* gnu/system.scm (<operating-system>)[users]: Use it as the default value.
* gnu/system/examples/bare-bones.tmpl (users): Use it.
* gnu/system/examples/desktop.tmpl (users): Likewise.
* doc/guix.texi (operating-system Reference, User Accounts): Adjust
accordingly.
Fixes <http://bugs.gnu.org/20646>.
Reported by David Thompson <davet@gnu.org>.
* gnu/system/shadow.scm (assert-valid-users/groups): New procedure
* gnu/system.scm (operating-system-activation-script): Use it.
* tests/guix-system.sh (make_user_config): New function.
Add 3 tests using it.
* po/guix/POTFILES.in: Add gnu/system/shadow.scm.
Partly fixes <http://bugs.gnu.org/20255>.
Reported by 宋文武 <iyzsong@gmail.com>.
* gnu/system.scm (etc-directory)[profile]: Source
/run/current-system/profile/etc/profile and
$HOME/.guix-profile/etc/profile when available. Move definitions of
SSL_CERT_DIR, SSL_CERT_FILE, and GIT_SSL_CAINFO before that.
Reported by Andy Wingo <wingo@pobox.com>.
* gnu/system.scm (user-shells, shells-file): New procedures.
(etc-directory): Add #:shell parameter. Use 'shells-file' instead of
'text-file'.
(operating-system-etc-directory): Call 'user-shells' and pass #:shells
to 'etc-directory'.
Fixes <http://bugs.gnu.org/20037>.
Reported by 宋文武 <iyzsong@gmail.com> and Tomáš Čech.
* gnu/system.scm (operating-system-etc-directory): Remove call to
'delete-duplicates'.
* gnu/system/linux.scm (pam-services->directory)[builder]: Add call to
'delete-duplicates'.
Suggested by Mark H Weaver <mhw@netris.org>.
* gnu/system.scm (certificate-bundle): New procedure.
(etc-directory): Use it.
[profile]: Set 'SSL_CERT_DIR', 'SSL_CERT_FILE', and 'GIT_SSL_CAINFO'.
* gnu/system.scm (emacs-site-file, emacs-site-directory): New
procedures.
(etc-directory): Add 'EMACSLOADPATH' setting to PROFILE. Call
'emacs-site-directory', and bind its result to /etc/emacs.
This reverts commit 3b09332adf, which
turned out to be a bad idea because we need to have dependency
information between the device-mapping service and the file-system
service that uses it.
* gnu/system/file-systems.scm (<mapped-device>)[needed-for-boot?]: New
field.
* gnu/system.scm (operating-system-user-mapped-devices,
operating-system-boot-mapped-devices): Use it instead of trying to
guess. Guessing doesn't work when one refers to a partition using its
label, for instance.
* doc/guix.texi (Mapped Devices): Document 'needed-for-boot?'.
* gnu/system/locale.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system.scm (<operating-system>)[locale]: Change the default to
"en_US.utf8".
(operating-system-locale-directory): New procecure.
(operating-system-derivation): Use it.
* doc/guix.texi (Using the Configuration System): Change example locale
to "fr_FR.utf8".
(operating-system Reference): Add xref to "Locales". Document
'locale-definitions'.
(Locales): New section.
* po/guix/POTFILES.in: Add gnu/system.scm.
Reported by Nikita Karetnikov.
* gnu/system/file-systems.scm (<file-system>): Rename 'needed-for-boot?'
accessor to '%file-system-needed-for-boot?'.
(file-system-needed-for-boot?): New inlinable procedure.
* gnu/system.scm (other-file-system-services)[file-systems]: Rely on
'file-system-needed-for-boot?' to handle the "/" case.
(operating-system-initrd-file)[boot-file-systems]: Likewise.
* gnu/build/activation.scm (activate-firmware): New procedure.
* gnu/system.scm (<operating-system>)[firmware]: New field.
(directory-union): New procedure.
(%base-firmware): New variable.
(operating-system-activation-script): Use 'directory-union', and call
'activate-firmware'.
* doc/guix.texi (operating-system Reference): Document 'firmware'.
* gnu/services/base.scm (user-unmount-service): New procedure.
* gnu/system.scm (essential-services): Use it.
* gnu/system/install.scm (cow-store-service): Mention it in comment.
Fixes <http://bugs.gnu.org/18525>.
Reported by Mark H Weaver <mhw@netris.org>.
* gnu/build/activation.scm (activate-modprobe): New procedure.
* gnu/system.scm (modprobe-wrapper): New procedure.
(operating-system-activation-script): Use both.
* gnu/build/linux-boot.scm (boot-system): Add #:pre-mount parameter and
honor it.
* gnu/system/linux-initrd.scm (base-initrd): Add #:mapped-devices
parameter. Add 'device-mapping-commands' variable, and use it to
build the #:pre-mount argument of 'boot-system'.
* gnu/system.scm (mapped-device-user,
operating-system-user-mapped-devices,
operating-system-boot-mapped-devices): New procedures.
(device-mapping-services): Use 'operating-system-user-mapped-devices'
instead of 'operating-system-mapped-devices'.
(operating-system-initrd-file): Call the initrd with #:mapped-devices.
* 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'.