Commit Graph

391 Commits (83457fe00efc12120fb2a41398b136353e0dcb51)

Author SHA1 Message Date
Ludovic Courtès 23afe939a2 system: pam: Use 'computed-file' instead of 'gexp->derivation'.
* gnu/system/linux.scm (pam-service->configuration): Use 'computed-file'
  instead of 'gexp->derivation'.
  (pam-services->directory): Likewise.
* gnu/system.scm (etc-directory): Adjust accordingly.
2015-10-10 22:46:15 +02:00
Ludovic Courtès 66e4f01c60 services: mingetty-service: Use <mingetty-configuration> objects.
* gnu/services/base.scm (<mingetty-configuration>): New record type.
  (mingetty-service): Expect a single <mingetty-configuration> instead
  of keyword arguments.
  (%base-services): Adjust accordingly.
* gnu/system/install.scm (installation-services): Likewise.
* doc/guix.texi (Base Services): Adjust accordingly.
2015-10-10 22:46:14 +02:00
Ludovic Courtès be1c2c54d9 system: Make service procedures non-monadic.
* gnu/services/avahi.scm (configuration-file): Use 'plain-file' instead
  of 'text-file'.
  (avahi-service): Turn into a regular procedure that returns a <service>.
* gnu/services/base.scm (root-file-system-service, file-system-service,
  user-unmount-service, user-processes-service, host-name-service,
  console-keymap-service, console-font-service, mingetty-service,
  nscd.conf-file, nscd-service): Likewise.
  (%default-syslog.conf): New variable.
  (syslog-service): Use it.  Turn into a regular procedure.
  (guix-service, udev-rules-union, kvm-udev-rule, udev-service,
  device-mapping-service, swap-service): Likewise.
* gnu/services/databases.scm (%default-postgres-hba,
  %default-postgres-ident): Use 'plain-file' instead of 'text-file'.
  (%default-postgres-config): Use 'mixed-text-file' instead of
  'text-file*'.
  (postgresql-service):  Use 'program-file' instead of 'gexp->script'.
  Turn into a regular procedure.
* gnu/services/desktop.scm (dbus-configuration-directory): Use
  'computed-file' instead of 'gexp->derivation'.
  (upower-configuration-file, geoclue-configuration-file,
  elogind-configuration-file): Use 'plain-file' instead of 'text-file'.
  (dbus-service, upower-service, colord-service, geoclue-service,
  polkit-service, elogind-service): Turn into regular procedures.
  (%desktop-services): Remove use of 'mlet' when iterating on
  %BASE-SERVICES.
* gnu/services/lirc.scm (lirc-service): Turn into a regular procedure.
* gnu/services/networking.scm (static-networking-service,
  dhcp-client-service, ntp-service, tor-service, bitlbee-service,
  wicd-service): Likewise.
* gnu/services/ssh.scm (lsh-service): Likewise.
* gnu/services/web.scm (nginx-service): Likewise.
* gnu/services/xorg.scm (xorg-configuration-file): Use 'mixed-text-file'
  instead of 'text-file*'.
  (xorg-start-command, slim-service): Turn into regular procedures.
  (xinitrc): Use 'program-file' instead of 'gexp->script'.
* gnu/system/install.scm (cow-store-service,
  configuration-template-service): Turn into regular procedures.
* gnu/system.scm (other-file-system-services, device-mapping-services,
  swap-services, essential-services, operating-system-services,
  user-shells, operating-system-accounts): Remove now unnecessary
  'mlet' and turn into regular procedures.
  (operating-system-etc-directory, operating-system-activation-script,
  operating-system-boot-script): Adjust accordingly.
* doc/guix.texi (Base Services, Networking Services, X Window, Desktop
  Services, Database Services, Web Services, Various Services, Name
  Service Switch): Adjust accordingly.
2015-10-10 22:46:14 +02:00
Ludovic Courtès ce8a6dfc43 services: 'mingetty-service' no longer takes monadic values.
* gnu/services/base.scm (mingetty-service): Change default value of
  #:motd from a monadic value to a <plain-file>.  Assume MOTD to be a
  file-like object.  Assume LOGIN-PROGRAM is a gexp or #f.
  (%base-services): Use 'plain-file' instead of 'text-file' for motd.
* gnu/system/linux.scm (unix-pam-service): Update docstring to mention
  that MOTD is a file-like object.
* doc/guix.texi (Base Services): Adjust 'mingetty-service' documentation
  accordingly.
* gnu/system/install.scm (installation-services): Adjust accordingly.
  (log-to-info): Use 'program-file' instead of 'gexp->script'.
2015-10-10 22:46:14 +02:00
Ludovic Courtès 46bd6edd5a gnu: libc: Look for locale data under /run/current-system/locale/X.Y.
* gnu/packages/base.scm (glibc)[arguments]: Append VERSION to
  'libc_cv_localedir'.
* gnu/system/locale.scm (localedef-command): Write to the sub-directory
  called (package-version libc) in #$output.
  (locale-directory): Create said directory.
* doc/guix.texi (Locales): Mention the per-version sub-directory.
2015-09-30 17:06:40 +02:00
Mark H Weaver bd90127ad4 Merge branch 'master' into core-updates 2015-09-22 16:38:48 -04:00
Ludovic Courtès 07779d0add linux-initrd: Add LUKS/dm-crypt modules to the initrd.
Suggested by Petter <petter@mykolab.ch>
and Mark H Weaver <mhw@netris.org>.

Partly fixes <http://bugs.gnu.org/19190>.

* gnu/system/linux-initrd.scm (base-initrd)[linux-modules]: Add dm-crypt
  and xts.
2015-09-20 22:05:50 +02:00
Ludovic Courtès cc0e575a94 linux-boot: Mount /dev as a devtmpfs from the start.
Suggested by Petter <petter@mykolab.ch>
and Mark H Weaver <mhw@netris.org>.
Reported by Duncan Keall <duncan@duncankeall.com>.

Partly fixes <http://bugs.gnu.org/19190> by populating /dev/mapper
early enough.

* gnu/build/linux-boot.scm (mount-essential-file-systems): Mount /dev as
  a devtmpfs.
  (move-essential-file-systems): Add /dev.
  (mount-root-file-system): Mount /rw-root/dev as a devtmpfs instead of
  calling 'make-essential-device-nodes'.
  (boot-system): Remove call to 'make-essential-device-nodes'.
* gnu/system/file-systems.scm (%devtmpfs-file-system): Remove.
* doc/guix.texi (File Systems): Adjust accordingly.
2015-09-20 22:05:36 +02:00
David Thompson 239db054a7 gnu: system: Add Linux container module.
* gnu/system/linux-container.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system.scm: Export 'operating-system-etc-directory',
  'operating-system-boot-script', 'operating-system-locale-directory', and
  'file-union'.
  (operating-system-boot-script): Add #:container? keyword argument.
  (operating-system-activation-script): Add #:container?  keyword argument.
  Don't call 'activate-firmware' or 'activate-ptrace-attach' when activating a
  container.
2015-09-14 08:30:46 -04:00
Ludovic Courtès 75710da667 Merge branch 'master' into core-updates 2015-09-13 21:28:01 +02:00
Ludovic Courtès 0081410da0 Revert "services: 'mingetty-service' no longer takes monadic values."
This reverts commit daa48c3179.
2015-09-13 12:04:55 +02:00
Ludovic Courtès daa48c3179 services: 'mingetty-service' no longer takes monadic values.
* gnu/services/base.scm (mingetty-service): Change default value of
  #:motd from a monadic value to a <plain-file>.  Assume MOTD to be a
  file-like object.  Assume LOGIN-PROGRAM is a gexp or #f.
  (%base-services): Use 'plain-file' instead of 'text-file' for motd.
* gnu/system/linux.scm (unix-pam-service): Update docstring to mention
  that MOTD is a file-like object.
* doc/guix.texi (Base Services): Adjust 'mingetty-service' documentation
  accordingly.
2015-09-13 11:54:56 +02:00
Mark H Weaver 14454f0bc5 file-systems: Add %elogind-file-systems; add it to %base-file-systems.
* gnu/system/file-systems.scm (%elogind-file-systems): New variable.
  (%base-file-systems): Add %elogind-file-systems.
2015-09-10 19:45:26 -04:00
Alex Kost 1ce6f43a6b gnu: wpa-supplicant-light: Rename to wpa-supplicant-minimal.
* gnu/packages/admin.scm (wpa-supplicant-light): Rename to ...
  (wpa-supplicant-minimal): ...this.
  (wpa-supplicant): Use it.
* gnu/system/install.scm (installation-os): Use it.
2015-09-06 12:14:57 +03:00
Mark H Weaver 92226a470d Build tarballs with deterministic file ordering.
* guix/packages.scm (patch-and-repack)[build],
  gnu/system/install.scm (self-contained-tarball)[build],
  gnu/packages/make-bootstrap.scm (tarball-package),
  gnu/packages/admin.scm (isc-dhcp),
  gnu/packages/video.scm (avidemux): Pass "--sort=name" to 'tar'.
2015-09-03 12:57:01 -04:00
Ludovic Courtès b263651860 doc: Mention the "normalized codeset" used in locale names.
* doc/guix.texi (Locales): Introduce "codeset".
  <%default-locale-definitions>: Mention the "normalized codeset", with
  an xref to libc's manual.
* gnu/system/locale.scm (%default-locale-definitions)[utf8-locale]:
  Mention the "normalized codeset" in a comment.
2015-08-29 23:56:47 +02:00
宋文武 9297065a2b system: Make PAM store SHA-512 encrypted passwords in /etc/shadow.
Fixes <http://bugs.gnu.org/21318>.

* gnu/system/linux.scm (unix-pam-service)[password]: Add 'sha512' and
  'shadow' to arguments.
2015-08-24 08:13:32 +08:00
Ludovic Courtès 72b891e50e vm: Make the list of partitions to build a parameter.
* gnu/build/vm.scm (<partition>): New record type.
  (fold2): New procedure.
  (initialize-partition-table): Remove #:bootable? and
  'partition-size' parameters.  Add 'partitions' parameter.  Invoke 'parted'
  with '--script'.
  (initialize-root-partition): Remove.
  (initialize-partition, root-partition-initializer): New procedures.
  (initialize-hard-disk): Remove #:system-directory, #:disk-image-size,
  #:file-system-type, #:file-system-label, #:closures, #:copy-closures?,
  #:bootable?, and #:register-closures? parameters.  Add #:partitions.
  Rewrite to use 'initialize-partition' for each item of PARTITIONS.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add (guix records)
  to #:modules default value.
  (qemu-image): Adjust accordingly.
2015-07-26 00:57:44 +02:00
Ludovic Courtès ec2406efc7 vm: Use the 'umount' procedure instead of util-linux's 'umount' command.
* gnu/build/vm.scm (initialize-root-partition, initialize-hard-disk): Use the
  'umount' procedure instead of invoking the 'umount' command.
* gnu/system/vm.scm (qemu-image): Remove UTIL-LINUX from INPUTS.
2015-07-24 01:19:57 +02:00
Ludovic Courtès b78cad85d3 file-systems: Subsystem cgroups now depend on /sys/fs/cgroup.
* gnu/system/file-systems.scm (%control-groups): Define 'parent' variable.
  Initialize the 'dependencies' field for all the subsystems.
2015-07-17 19:25:09 +02:00
Ludovic Courtès e51710d1ef file-systems: Add a 'dependencies' field to <file-system>.
* gnu/system/file-systems.scm (<file-system>)[dependencies]: New field.
* gnu/system.scm (other-file-system-services)[requirements]: Honor
  'file-system-dependencies'.
* doc/guix.texi (File Systems): Document it.
2015-07-17 19:24:15 +02:00
Ludovic Courtès 68ac258b52 system: Use the CRDA udev rules.
* gnu/services/base.scm (%base-services): Add CRDA to the #:rules of
  'udev-service'.
* gnu/system/install.scm (installation-services): Likewise.
2015-07-17 15:35:57 +02:00
Ludovic Courtès ee2a6304f3 system: Add 'kernel-arguments' field.
* gnu/system.scm (<operating-system>)[kernel-arguments]: New field.
  (operating-system-grub.cfg): Honor it.
  (operating-system-parameters-file): Add 'kernel-arguments' to the parameters
  file.
* guix/scripts/system.scm (previous-grub-entries)[system->grub-entry]: Read
  the 'kernel-arguments' field of the parameters file, when available.
* gnu/system/vm.scm (system-qemu-image/shared-store-script):
  Use (operating-system-kernel-arguments os) in '-append'.
* doc/guix.texi (operating-system Reference): Document it.
2015-07-17 01:11:06 +02:00
Ludovic Courtès 2378df558a system: Fix typo in 'PS1' in skeleton '.bashrc'.
* gnu/system/shadow.scm (default-skeletons): Move misplaced backslash.
2015-07-17 00:20:08 +02:00
Ludovic Courtès 6c92551af9 install: Reset the mtimes of all the files in the binary tarball.
* gnu/system/install.scm (self-contained-tarball): Pass "--mtime=@0".  The
  only files whose mtime was not already were those in /var/guix and
  /gnu/store/.links.
2015-07-16 09:58:19 +02:00
Ludovic Courtès 1cab9e810e file-systems: 'uuid' raises a syntax error for invalid UUIDs.
* gnu/system/file-systems.scm (uuid): Call 'syntax-violation' when
  'string->uuid' returns #f.
* tests/file-systems.scm ("uuid, syntax error"): New test.
2015-07-16 09:49:36 +02:00
Ludovic Courtès 661a1d7924 file-systems: Allow users to specify file system UUIDs as strings.
Fixes <http://bugs.gnu.org/19778>.
Reported by Mark H Weaver <mhw@netris.org>.

* gnu/system/file-systems.scm (%uuid-rx): New variable.
  (string->uuid): New procedure.
  (uuid): New macro.
* tests/file-systems.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* doc/guix.texi (File Systems): Give an example of UUID.
2015-07-14 15:24:20 +02:00
Mathieu Lirzin b57ec5f6cd gnu: file-systems: Fix typo.
* gnu/system/file-systems.scm (%container-file-systems): Fix typo in a
  comment.
2015-07-13 16:22:16 +02:00
Mark H Weaver f8facc18ed install: Fix variable reference to iproute2 package.
This is a followup to commit d43002f645.

* gnu/system/install.scm (installation-os)[packages]: Refer to IPROUTE instead
  of IPROUTE2.
2015-07-11 16:44:23 -04:00
Ludovic Courtès d43002f645 install: Add iproute2 to the installation image.
Fixes <http://bugs.gnu.org/21019>.
Reported by <info@danieleparisi.me>.

* gnu/system/install.scm (installation-os)[packages]: Add IPROUTE2.
2015-07-11 12:25:39 +02:00
David Thompson 1e49bcf981 gnu: Include (guix build syscalls) module in initrd/VM derivations.
This bug was introduced in commit 85c3127.

Thanks to Christopher Webber for reporting it.

* gnu/syste/linux-initrd.scm (base-initrd): Include (guix build syscalls)
  module in derivation.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2015-07-10 09:47:07 -04:00
David Thompson c829bc80bd gnu: system: Add Linux container file systems.
* gnu/system/file-systems.scm (%container-file-systems): New variable.
2015-07-09 08:25:33 -04:00
David Thompson 575b4b092d gnu: system: Move file-system->spec to (gnu system file-systems).
* gnu/system/linux-initrd.scm (file-system->spec): Move this...
* gnu/system/file-systems.scm: ... to here.
2015-07-07 21:20:59 -04:00
David Thompson 9110c2e942 gnu: system: Move <file-system-mapping> into (gnu system file-systems).
* gnu/system/vm.scm (<file-system-mapping>, %store-mapping): Move from here...
* gnu/system/file-systems.scm: ...to here.
* guix/scripts/system.scm: Import (gnu system file-systems).
2015-07-07 21:20:59 -04:00
Ludovic Courtès 28de8d258b environment: Define 'GUIX_ENVIRONMENT'.
* guix/scripts/environment.scm (create-environment): Define 'GUIX_ENVIRONMENT'.
* doc/guix.texi (Invoking guix environment): Document it.
* gnu/system/shadow.scm (default-skeletons): Adjust 'PS1' depending on whether
  'GUIX_ENVIRONMENT' is defined.
2015-07-01 23:29:49 +02:00
Ludovic Courtès e8277f90c8 linux-initrd: Use (guix cpio) instead of GNU cpio.
* gnu/build/linux-initrd.scm (write-cpio-archive): Remove 'open-pipe*' and
  related calls.  Compute list of files in 'files' variable.  Use
  'cpio:write-cpio-archive'.  Remove #:cpio parameter.
  (build-initrd): Remove #:cpio parameter.
* gnu/system/linux-initrd.scm (expression->initrd): Likewise, and adjust
  BUILDER accordingly.  Add (guix cpio) to #:modules.
2015-06-24 18:05:03 +02:00
David Thompson 727636aaf8 gnu: Add control group file systems.
* gnu/system/file-systems.scm (%control-groups): New variable.
  (%base-file-system): Include control group file systems.
2015-06-19 07:49:18 -04:00
Ludovic Courtès 08fa76131e install: Turn off deduplication for the binary tarball.
* gnu/build/install.scm (register-closure): Add #:deduplicate? parameter and
  honor it.
  (populate-single-profile-directory): Likewise.
* gnu/system/install.scm (self-contained-tarball): Pass #:deduplicate? #f.
  Invoke tar with --check-links.
2015-06-18 00:25:48 +02:00
Ludovic Courtès e1ad6bfbe1 install: Use udev rules for device-mapper.
Fixes <http://bugs.gnu.org/20791>.
Reported by Benz Schenk <benz.schenk@uzh.ch>.

* gnu/system/install.scm (installation-services): Add #:rules argument for
  'udev-service'.
2015-06-12 19:29:52 +02:00
Ludovic Courtès 7acd3439ea install: Omit /root from the binary tarball.
Suggested by Thomas Schwinge <thomas@codesourcery.com>.

* gnu/system/install.scm (self-contained-tarball): Remove
  "/root/.guix-profile" from the 'tar' arguments.
* doc/guix.texi (Binary Installation): Add a step to create
  ~root/.guix-profile.
2015-06-08 23:25:51 +02:00
Ludovic Courtès 781d0a2ce1 install: Use the actual store name when building the tarball.
* gnu/system/install.scm (self-contained-tarball): Use (%store-directory)
  instead of "/gnu".
2015-05-27 22:18:21 +02:00
Ludovic Courtès bf87f38ace system: Define '%base-user-accounts'.
* 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.
2015-05-25 21:34:23 +02:00
Ludovic Courtès 0c09a306e5 system: Make sure user accounts refer to existing groups.
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.
2015-05-24 18:02:54 +02:00
Mark H Weaver b2a5fa594e install: Omit /, /root, and /var from binary tarball.
* gnu/system/install.scm (self-contained-tarball): Pass
  "./root/.guix-profile", "./var/guix", and "./gnu" to 'tar' command instead
  of ".".
2015-05-20 13:03:03 -04:00
Ludovic Courtès 01dbc7e01a install: Files in the tarball are all root-owned.
Fixes a thinko introduced in 175ced4.

* gnu/system/install.scm (self-contained-tarball): Use "root:0" as the
  owner and group.
* doc/guix.texi (Binary Installation): Revert 175ced4.
2015-05-18 00:43:28 +02:00
Ludovic Courtès 175ced413c install: Use the right user and group name for files in the binary tarball.
Suggested by Andreas Enge <andreas@enge.fr>
at <http://lists.gnu.org/archive/html/guix-devel/2015-05/msg00220.html>.

* gnu/system/install.scm (self-contained-tarball): Pass --owner and
  --group to 'tar'.
* doc/guix.texi (Binary Installation): Move group and account creation
  before extraction.  Make "run the daemon" a separate step.
2015-05-18 00:12:39 +02:00
Mark H Weaver b599e9ebf5 install: desktop.tmpl: Add "netdev" to the user's supplementary groups.
* gnu/system/examples/desktop.tmpl: Add "netdev" to the user's supplementary
  groups.
2015-05-11 22:40:31 -04:00
Ludovic Courtès efb5e833ba doc: Document X.509 certificates.
* doc/guix.texi (Using the Configuration System): Add xref to "X.509
  Certificates".
  (X.509 Certificates): New section.
* gnu/system/examples/desktop.tmpl: Use NSS-CERTS.
2015-05-11 23:01:20 +02:00
Ludovic Courtès e1fbc32a0a install: Have several OS config templates under /etc/configuration.
* gnu/system/install.scm (configuration-template-service): Remove
  'local-template' and 'template'.  Add 'search' and 'templates'.
  [activate]: Copy all of TEMPLATES to /etc/configuration.
* doc/guix.texi (System Installation): Adjust file name accordingly.
2015-05-09 23:53:36 +02:00
Ludovic Courtès 36ffaca246 doc: Add desktop configuration example.
* gnu/system/examples/bare-bones.tmpl: Change 'packages' and
  'host-name'.  Remove D-Bus, Avahi, and SLiM services, and add lsh
  instead.
* gnu/system/examples/desktop.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.
2015-05-09 23:53:36 +02:00
Ludovic Courtès 54d6223d2c doc: Rename OS config example.
* gnu/system/os-config.tmpl: Rename to...
* gnu/system/examples/bare-bones.tmpl: ... this.
* Makefile.am (EXAMPLES): Adjust accordingly.
* doc.am (doc/os-config.texi): Likewise.
* gnu/system/install.scm (configuration-template-service)[template]:
  Likewise.
2015-05-09 23:53:36 +02:00
Ludovic Courtès 15137a29c2 nss: Add '%mdns-host-lookup-nss'.
* gnu/system/nss.scm (%mdns-host-lookup-nss): New variable.
* doc/guix.texi (Name Service Switch): Document it.
2015-05-08 16:35:32 +02:00
Ludovic Courtès cf2abac8ec artwork: Update to latest version.
* gnu/artwork.scm (%artwork-repository): Update.
* gnu/services/xorg.scm (%default-slim-theme-name): Change to "0.x".
* gnu/system/grub.scm (%background-image): Change to
  GuixSD-fully-black-4-3.svg.
2015-05-07 23:11:23 +02:00
Ludovic Courtès f4bdfe7381 install: Add bash-completion to the packages.
* gnu/system/install.scm (installation-os)[packages]: Add
  BASH-COMPLETION.
2015-05-03 00:08:37 +02:00
Ludovic Courtès 3392ce5d60 system: Make /gnu/store a read-only bind mount by default.
* gnu/system/file-systems.scm (%immutable-store): New variable.
  (%base-file-systems): Add it.
* doc/guix.texi (File Systems): Document it.
2015-04-20 22:21:51 +02:00
Ludovic Courtès 9d3fb6c767 install: Add a procedure to build a self-contained binary tarball.
Suggested by Pjotr Prins <pjotr.public12@thebird.nl>
at <http://lists.gnu.org/archive/html/guix-devel/2015-04/msg00229.html>.

* gnu/build/install.scm (populate-single-profile-directory): New procedure.
* gnu/system/install.scm (self-contained-tarball): New procedure.
* Makefile.am (guix-binary.%.tar.xz): New target.
2015-04-14 23:20:26 +02:00
Ludovic Courtès e26d5076df linux-initrd: Add virtio drivers by default.
* gnu/system/linux-initrd.scm (base-initrd): Change #:virtio? default
  to #t.  This will facilitate the use of GuixSD in VM guests.
2015-04-05 23:15:20 +02:00
Andy Wingo 0d275f4aa3 system: Take kernel modules from the user-specified kernel.
* gnu/system/linux-initrd.scm (base-initrd): Add #:linux option to
  specify the linux kernel to use.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Propagate
  #:linux to base-initrd.
* gnu/system.scm (operating-system-initrd-file): Pass #:linux to
  'make-initrd'.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-04-05 23:15:20 +02:00
Ludovic Courtès 2f094a69f0 system: Skeleton '.bashrc' now exports the 'SHELL' variable.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Export 'SHELL'.
2015-03-16 23:30:59 +01:00
Ludovic Courtès 9a10acc986 system: Adjust '.bashrc' skeleton for non-interactive SSH sessions.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Source /etc/profile
  when in a non-interactive SSH session.
2015-03-12 19:00:54 +01:00
Ludovic Courtès 11dddd8a3e system: Don't compare <pam-service> objects with 'equal?'.
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'.
2015-03-10 18:07:48 +01:00
Ludovic Courtès 0c36a681c8 doc: Add 'packages' field to OS configuration template.
* gnu/system/os-config.tmpl (packages): New field.
2015-03-08 23:05:51 +01:00
Ludovic Courtès 9c09760a78 artwork: Update snapshot to GuixSD branding.
* gnu/artwork.scm (%artwork-repository): Update to new "GuixSD"
  branding.
* gnu/system/grub.scm (%background-image, %default-theme): Adjust
  accordingly.
2015-02-12 23:43:18 +01:00
Ludovic Courtès 34875383c1 linux-initrd: Add 'isci' module, needed for some SAS controllers.
Encountered on a Dell Precision T3600.

* gnu/system/linux-initrd.scm (base-initrd)[linux-modules]: Add isci.
2015-02-09 18:18:41 +01:00
Mark H Weaver 4fb7e0de19 gnu: wpa-supplicant: Add dbus support; add wpa-supplicant-light.
* gnu/packages/admin.scm (wpa-supplicant-light): New variable containing the
  previous dbus-free package, but renamed.  Remove outdated TODO comments.
  (wpa-supplicant): Now inherits from wpa-supplicant-light but adds dbus
  support.
* gnu/system/install.scm (installation-os): Use wpa-supplicant-light.
2015-02-04 18:20:17 -05:00
Ludovic Courtès 996ed73948 system: Add bindings to configure libc's NSS.
* gnu/system/nss.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu.scm (%public-modules): Add it.
* gnu/system.scm (<operating-system>)[name-service-switch]: New field.
  (etc-directory): Add #:nss parameter and honor it.
  (operating-system-etc-directory): Adjust call accordingly.
* doc/guix.texi (operating-system Reference): Document
  'name-service-switch'.
  (Name Service Switch): New section.
2015-02-04 22:49:35 +01:00
Ludovic Courtès 7de2b18612 install: Add iw to the packages.
* gnu/system/install.scm (installation-os)[packages]: Add IW.
2015-01-28 10:56:04 +01:00
Ludovic Courtès 493c245b8f linux-initrd: Add USB kernel modules to the default initrd.
* gnu/system/linux-initrd.scm (base-initrd)[linux-modules]: Add
  usb-storage, uas, usbkbd, and usbhid.
* gnu/system/vm.scm (system-disk-image): Remove #:extra-modules argument
  to 'base-initrd'.
2015-01-27 21:32:06 +01:00
Ludovic Courtès c73adb0998 install: Mention GSD.
* gnu/system/install.scm (installation-services): Mention the Guix
  System Distribution.
2015-01-27 10:24:35 +01:00
Ludovic Courtès 53a7a01675 doc: Add services to the configuration template.
* gnu/system/os-config.tmpl (services): New field.
2015-01-23 16:29:17 +01:00
Ludovic Courtès dd6b28d18b install: Make sure 'info' can decompress the Info files.
* gnu/system/install.scm (log-to-info): Add GZIP to $PATH.
2015-01-23 10:37:01 +01:00
Ludovic Courtès 24004073f0 system: Add "en_US.UTF-8" to the default locales, for backward compatibility.
* gnu/system/locale.scm (%default-locale-definitions): Add
  "en_US.UTF-8".
2015-01-16 21:11:55 +01:00
Ludovic Courtès e87f0591f3 monads: Move '%store-monad' and related procedures where they belong.
This turns (guix monads) into a generic module for monads, and moves the
store monad and related monadic procedures in their corresponding
module.

* guix/monads.scm (store-return, store-bind, %store-monad, store-lift,
  text-file, interned-file, package-file, package->derivation,
  package->cross-derivation, origin->derivation, imported-modules,
  compiled, modules, built-derivations, run-with-store): Move to...
* guix/store.scm (store-return, store-bind, %store-monad, store-lift,
  text-file, interned-file): ... here.
  (%guile-for-build): New variable.
  (run-with-store): Moved from monads.scm.  Remove default value for
  #:guile-for-build.
* guix/packages.scm (default-guile): Export.
  (set-guile-for-build): New procedure.
  (package-file, package->derivation, package->cross-derivation,
  origin->derivation): Moved from monads.scm.
* guix/derivations.scm (%guile-for-build): Remove.
  (imported-modules): Rename to...
  (%imported-modules): ... this.
  (compiled-modules): Rename to...
  (%compiled-modules): ... this.
  (built-derivations, imported-modules, compiled-modules): New
  procedures.
* gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm,
  gnu/services/dmd.scm, gnu/services/networking.scm,
  gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm,
  gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm,
  guix/gexp.scm, guix/git-download.scm, guix/profiles.scm,
  guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly.
* guix/monad-repl.scm (default-guile-derivation): New procedure.
  (store-monad-language, run-in-store): Use it.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit
  'set-guile-for-build' call.
* guix/scripts/archive.scm (derivation-from-expression): Likewise.
* guix/scripts/build.scm (options/resolve-packages): Likewise.
* guix/scripts/environment.scm (guix-environment): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* doc/guix.texi (The Store Monad): Adjust module names accordingly.
2015-01-14 13:34:52 +01:00
Ludovic Courtès 61ff0a3a18 install: Use a low-memory nscd caching policy.
* gnu/system/install.scm (%nscd-minimal-caches): New variable.
  (installation-services): Use as 'nscd-service' argument.
2014-12-14 17:26:03 +01:00
Ludovic Courtès ccc2678b0d system: grub: Make sure the font and background image are always found.
* gnu/system/grub.scm (eye-candy): Add 'search --file --set'.
2014-12-13 22:15:01 +01:00
Ludovic Courtès 6c777cf88c system: Adjust 'grub.cfg' to work on systems with a separate /boot.
Fixes <http://bugs.gnu.org/19220>.
Reported by Nikita Karetnikov <nikita@karetnikov.org>.

* gnu/system/grub.scm (grub-configuration-file)[entry->gexp]: Add
  'search --file --set'.
  (grub-configuration-file)[builder]: Remove 'search.file'.
2014-12-13 22:13:57 +01:00
Ludovic Courtès 5c5e7bdafd vm: Use QEMU's standard VGA emulation by default.
* gnu/system/vm.scm (common-qemu-options): Add "-vga std".
2014-12-13 17:18:05 +01:00
宋文武 02f707c590 system: Add skeleton '.zlogin'.
* gnu/system/shadow.scm (default-skeletons): Add .zlogin.
2014-12-09 18:52:11 +08:00
宋文武 4e2a21d3d2 system: Cleanup bash startup files.
* gnu/system.scm (etc-directory) (bashrc): Rename to 'profile'.
* gnu/system/shadow.scm (default-skeletons): Rename '.bashrc' to
  '.bash_profile'. Don't source /etc/profile.
2014-12-09 18:51:01 +08:00
Ludovic Courtès a182e94e25 linux-initrd: Add the 'virtio_console' module for QEMU guests.
* gnu/system/linux-initrd.scm (base-initrd)[virtio-modules]: Add
  "virtio_console".
2014-12-08 23:29:23 +01:00
Ludovic Courtès 9cb426b8bf Revert "system: Add a 'needed-for-boot?' field to 'mapped-device'."
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.
2014-11-30 18:54:07 +01:00
Alex Kost 1cc8f3a63c system: locale: Fix typo in docstring.
* gnu/system/locale.scm (localedef-command): Fix typo.
2014-11-30 00:33:00 +03:00
Ludovic Courtès 3b09332adf system: Add a 'needed-for-boot?' field to 'mapped-device'.
* 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?'.
2014-11-29 14:40:26 +01:00
Ludovic Courtès 9cd0dfaa46 system: Change "en_US.UTF-8" to "en_US.utf8".
* build-aux/hydra/demo-os.scm (locale): Change to "en_US.utf8".
* gnu/system/install.scm (installation-os)[locale]: Ditto.
2014-11-29 11:37:53 +01:00
Ludovic Courtès 08b1990a93 linux-initrd: Remove the ".ko" suffix from module names in 'base-initrd'.
* gnu/system/linux-initrd.scm (base-initrd): Remove the .ko suffix from
  module names.
2014-11-28 00:10:28 +01:00
Ludovic Courtès d7e66f6295 linux-initrd: Remove now redundant module names.
* gnu/system/linux-initrd.scm (base-initrd)[virtio-modules]: Remove
  "virtio.ko" and "virtio_ring.ko".
  [virtio-9p-modules]: Remove "fscache.ko" and "9pnet.ko".
  [linux-modules]: Remove "libahci.ko".
2014-11-28 00:10:28 +01:00
Ludovic Courtès 0e704a2d4e linux-boot: Load modules and their dependencies, à la 'modprobe'.
* gnu/build/linux-boot.scm: Use (gnu build linux-modules).
  (load-linux-module*): Remove.
  (boot-system): Add #:linux-module-directory parameter.
  [lookup-module]: New procedure.
  Call 'current-module-debugging-port'.  Pass #:lookup-module to
  'load-linux-module*'.  Map LOOKUP-MODULE on LINUX-MODULES.
* gnu/system/linux-initrd.scm (base-initrd): Adjust 'boot-system' call
  accordingly.  Adjust #:modules argument as well.
* gnu/system.scm (operating-system-activation-script)[%modules]: Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2014-11-28 00:10:28 +01:00
Ludovic Courtès 600c285b63 linux-initrd: Copy modules and their dependencies to the initrd.
* gnu/system/linux-initrd.scm (flat-linux-module-directory)[build-exp]:
  Add 'lookup' procedure.  Use 'recursive-module-dependencies' to
  compute the list of modules to copy.
  Adjust #:modules parameter.
2014-11-28 00:10:28 +01:00
Ludovic Courtès 598e19dca1 system: Build system-wide locale definitions.
* 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.
2014-11-27 08:55:46 +01:00
Ludovic Courtès 4d6b879cb5 file-systems: 'file-system-needed-for-boot?' always returns #t for "/".
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.
2014-11-25 18:01:59 +01:00
Ludovic Courtès db84467a90 install: Add wpa-supplicant to the image.
Reported by Amirouche Boubekki <amirouche.boubekki@gmail.com>.

* gnu/system/install.scm (installation-os)[packages]: Add
  WPA-SUPPLICANT.
2014-11-25 18:01:59 +01:00
Ludovic Courtès b419c7f5fb install: Add Cryptsetup to the image.
Reported by Nikita Karetnikov.

* gnu/system/install.scm (installation-os)[packages]: Add CRYPTSETUP.
* doc/guix.texi (System Installation): Mention it.
2014-11-23 21:56:31 +01:00
Ludovic Courtès fcf63cf880 vm: Introduce 'file-system-mapping'.
* gnu/system/vm.scm (<file-system-mapping>): New record type.
  (%store-mapping): New variable.
  (host-9p-file-system): Rename to...
  (mapping->file-system): ... this.  Replace 'source' and 'target'
  parameters with 'mapping'.  Set 'flags' field.
  (virtualized-operating-system): Add 'mappings' parameter and  honor
  it.
  (system-qemu-image/shared-store-script): Add 'mappings' parameter.
  Pass it to 'virtualized-operating-system'.  Use it in argument to
  'common-qemu-options'.
2014-11-20 23:32:54 +01:00
Ludovic Courtès 96ffa27ba4 vm: Formalize use of '-virtfs' options.
* gnu/system/vm.scm (file-system->mount-tag, host-9p-file-system): New
  procedures.
  (virtualized-operating-system): Use 'host-9p-file-system' for the
  store.
  (common-qemu-options): Add 'shared-fs' parameter.
  [virtfs-option]: New procedure.
  Use it.
  (system-qemu-image/shared-store-script): Adjust accordingly.
2014-11-20 23:30:44 +01:00
Ludovic Courtès ceb6b4c2aa linux-initrd: Add modules for ATA controllers by default.
Reported by th3kent on #guix.

* gnu/system/linux-initrd.scm (base-initrd)[linux-modules]: Add
  pata_acpi.ko and pata_atiixp.ko.
2014-11-13 10:42:32 +01:00
Ludovic Courtès 84dfb45821 gnu: Introduce (gnu artwork) module.
* gnu/artwork.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/services/xorg.scm: Use it.
  (%artwork-repository): Remove.
* gnu/system/grub.scm: Use it.
  (%artwork-repository): Remove.
2014-11-12 14:28:36 +01:00
Ludovic Courtès fdaacbad85 services: Add 'auto-start?' field to <service>.
* gnu/services.scm (<service>)[auto-start?]: New field.
* gnu/services/dmd.scm (dmd-configuration-file): Honor it.
* gnu/system/install.scm (cow-store-service): Add 'auto-start?' field.
2014-11-10 23:23:32 +01:00
Ludovic Courtès b756d3da4c doc: Mention "audio" and "video" groups in configuration template.
* gnu/system/os-config.tmpl (users): Add "audio" and "video" groups and
  explain.
2014-11-10 22:42:14 +01:00
Ludovic Courtès d6e2a622c4 services: Add 'user-unmount-service' as an essential service.
* 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.
2014-11-10 22:42:14 +01:00
Ludovic Courtès 7eda0c567b install: Add GRUB to the set of global packages.
* gnu/system/install.scm (installation-os)[packages]: Add GRUB.
2014-11-10 22:42:14 +01:00
Ludovic Courtès 28567712f3 system: grub: Adjust default theme color.
* gnu/system/grub.scm (%default-theme)[color-highlight]: Change
  foreground to cyan, as suggested by Felipe López.
2014-11-08 22:34:24 +01:00
Ludovic Courtès 99ae9ceb18 system: grub: Add preliminary support for themes.
* gnu/system/grub.scm (<grub-image>, <grub-theme>): New record types.
  (%artwork-repository, %background-image): New variables.
  (<grub-configuration>)[theme]: New field.
  (svg->png, resize-image, grub-background-image, eye-candy): New
  procedures.
  (grub-configuration-file): Use 'eye-candy' and add it in BUILDER.
2014-11-08 15:10:42 +01:00
Ludovic Courtès 810568b35f vm: The 'run-vm' scripts now passes its arguments to QEMU.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add "$@" at
  the end of the script.
  (common-qemu-options): Remove trailing newline.
* doc/guix.texi (Invoking guix system): Document it.
2014-11-08 15:10:42 +01:00
Ludovic Courtès 6aa260af12 vm: Fix 'vm --full-boot' to produce a sufficient disk image.
* gnu/system/vm.scm (system-qemu-image/shared-store): Add
  #:disk-image-size and #:full-boot? parameters and honor them.  Pass
  '#:copy-inputs? full-boot?', and change #:inputs argument.
* guix/scripts/system.scm (system-derivation-for-action): Pass
  #:disk-image-size to 'system-qemu-image/shared-store'.
* doc/guix.texi (Invoking guix system): Mention use of '--image-size' in
  conjunction with '--full-boot'.
2014-11-08 15:10:42 +01:00
Ludovic Courtès ab11f0bed4 vm: Support 'guix system vm --full-boot'.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add
  #:full-boot? parameter and honor it.
* guix/scripts/system.scm (system-derivation-for-action): Likewise.
  (perform-action): Likewise.
  (show-help): Document '--full-boot'.
  (%options): Add '--full-boot'.
  (guix-system): Add #:full-boot? argument in call to 'perform-action'.
* doc/guix.texi (Invoking guix system): Document it.
2014-11-08 01:05:35 +01:00
Ludovic Courtès 3c1f0e3b99 vm: Factorize common QEMU options.
* gnu/system/vm.scm (common-qemu-options): New procedure.
  (system-qemu-image/shared-store-script): Use it.
2014-11-06 22:58:31 +01:00
Ludovic Courtès 263d05be8d vm: Remove unused procedure.
* gnu/system/vm.scm (input->name+output): Remove.  Its last user
  disappeared in commit b53833b.
2014-11-06 19:26:27 +01:00
Ludovic Courtès 65fb4515f0 vm: Disable swap devices in virtualized OSes.
* gnu/system/vm.scm (virtualized-operating-system): Add 'swap-devices'
  field.
2014-11-05 11:25:39 +01:00
Ludovic Courtès 52ac153e2a linux-initrd: Adjust VM code and doc to new 'base-initrd' signature.
This fixes regressions introduced in de1c158 ("system: Add support for
boot-time mapped devices.").

* doc/guix.texi (Initial RAM Disk): Adjust example with custom use of
  'base-initrd'.  Document #:mapped-devices parameter of 'base-initrd'.
* gnu/system/vm.scm (system-disk-image, system-qemu-image,
  virtualized-operating-system): Adjust call to 'base-initrd' to new
  signature.
2014-09-22 21:29:41 +02:00
Ludovic Courtès de1c158f32 system: Add support for boot-time mapped devices.
* 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.
2014-09-22 11:20:41 +02:00
Ludovic Courtès 7f28bf9a43 system: Add udev rule for /dev/kvm.
* 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".
2014-09-18 23:23:46 +02:00
Ludovic Courtès 6c1df0819c linux-initrd: Remove now obsolete #:guile-modules-in-chroot? parameter.
* gnu/build/linux-boot.scm (boot-system): Remove
  #:guile-modules-in-chroot? and related code.
* gnu/system/linux-initrd.scm (base-initrd): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Remove
  #:guile-modules-in-chroot? argument in 'base-initrd' call.
2014-09-18 23:05:22 +02:00
Ludovic Courtès 722554a306 system: Define 'device-mapping-kind', and add a 'close' procedure.
* 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'.
2014-09-18 19:18:39 +02:00
Ludovic Courtès e617a86137 system: Add "input" to '%base-groups'.
* gnu/system/shadow.scm (%base-groups): Add "input" group.
2014-09-16 22:43:55 +02:00
Ludovic Courtès 5dae0186de system: Add support for Linux-style mapped devices.
* 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.
2014-09-12 00:14:52 +02:00
Ludovic Courtès f9d53de105 system: Add default PAM entries for xlock and xscreensaver.
* gnu/system/linux.scm (base-pam-services): Add "xlock" and
  "xscreensaver".
2014-09-12 00:14:52 +02:00
Ludovic Courtès 42d10464be linux-initrd: Store Linux modules in a normal store directory.
* gnu/system/linux-initrd.scm (expression->initrd): Remove #:linux and
  #:linux-modules parameters.  Remove call to
  'float-linux-module-directory'.
  (base-initrd): Add call to 'float-linux-module-directory'.  Use it in
  #:linux-modules argument in the gexp.  Remove #:linux and
  #:linux-modules arguments to 'expression->initrd'.
* gnu/build/linux-initrd.scm (build-initrd): Remove
  #:linux-module-directory parameter.  Don't create 'modules'
  sub-directory.
* gnu/build/linux-boot.scm (boot-system): Mentin that LINUX-MODULES is a
  list of absolute file names.  Don't prepend "/modules/" to
  LINUX-MODULES.
* doc/guix.texi (Initial RAM Disk): Adjust accordingly.
2014-09-08 23:47:29 +02:00
Ludovic Courtès df650fa84e linux-initrd: Remove #:to-copy argument of 'expression->initrd'.
* gnu/system/linux-initrd.scm (expression->initrd): Remove #:to-copy
  parameter.  Remove 'graph-files', and adjust #:references-graphs
  arguments to just list INIT.
  (base-initrd): Remove #:to-copy argument.
* doc/guix.texi (Initial RAM Disk): Adjust accordingly.
2014-09-08 23:47:28 +02:00
Ludovic Courtès 1621cf97aa linux-initrd: Move initrd creation code to (guix build linux-initrd).
* gnu/build/linux-initrd.scm (cache-compiled-file-name,
  compile-to-cache, build-initrd): New procedures.
* gnu/system/linux-initrd.scm (expression->initrd)[builder]: Remove code
  now moved above.  Use 'build-initrd'.
2014-09-08 23:47:28 +02:00
Ludovic Courtès 70608adb4a linux-initrd: Copy all the script's closure to the initrd.
* gnu/system/linux-initrd.scm (expression->initrd): Remove calls to
  'imported-modules' and 'compiled-modules'.  Use 'gexp->script' with
  EXP.  Add the result to TO-COPY.  Make /init a symlink to that script,
  and copy its closure into the "contents" directory.  Add fake
  /proc/self/exe symlink.
* gnu/build/linux-boot.scm (load-linux-module*): Add comment about mmap.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add "-m
  256".  This turns out to be needed for initrds containing things like
  e2fsck and several modules; with the default of 128 MiB, loading
  libahci.ko may fail with -1.
2014-09-08 23:47:28 +02:00
Ludovic Courtès 49fa9381b8 linux-initrd: Populate the initrd's store with complete closures.
* gnu/system/linux-initrd.scm (expression->initrd): Add 'graph-files'.
  Use (guix build store-copy) and 'populate-store' instead of local
  hack.  Pass #:references-graphs to 'gexp->derivation'.
2014-09-06 23:42:56 +02:00
Ludovic Courtès b53833b2ef gexp: Allow use of high-level objects in #:references-graphs.
* guix/gexp.scm (lower-reference-graphs): New procedure.
  (gexp->derivation)[graphs-file-names]: New procedure.
  Use 'lower-reference-graphs', and augment #:inputs argument as a
  function of #:references-graphs.
* doc/guix.texi (G-Expressions): Adjust 'gexp->derivation' documentation
  accordingly.
* tests/gexp.scm ("gexp->derivation, store copy"): Remove reference to
  TWO in BUILD-DRV.  Use TWO directly in #:references-graphs argument.
  ("gexp->derivation #:references-graphs"): New test.
* gnu/system/vm.scm (qemu-image): Remove variable 'graph'; use INPUTS as
  the #:references-graphs argument to
  'expression->derivation-in-linux-vm'.
2014-09-06 23:42:56 +02:00
Ludovic Courtès 6fd1a79674 vm: Move store copy handling to (guix build store-copy).
* gnu/build/vm.scm (read-reference-graph, populate-store): Move to...
* guix/build/store-copy.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Adjust default
  #:modules values accordingly.
* tests/gexp.scm ("gexp->derivation, store copy"): New test.
2014-09-04 23:24:54 +02:00
Ludovic Courtès b21a1c5a18 linux-initrd: Move Linux module tree flattening to another derivation.
* gnu/system/linux-initrd.scm (expression->initrd)[string->regexp]:
  Remove.
  Use 'flat-linux-module-directory'.  Remove the equivalent logic from
  'builder'.
  (flat-linux-module-directory): New procedure.
2014-09-04 22:51:04 +02:00
Ludovic Courtès fbb3555809 linux-initrd: Factorize cpio archive creation.
* gnu/build/linux-initrd.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system/linux-initrd.scm (expression->initrd): Use (gnu build
  linux-initrd) and 'write-cpio-archive' instead of the inlined code.
2014-09-03 15:43:07 +02:00
Ludovic Courtès e2f4b305d0 Move part of (gnu build linux-boot) to (gnu build file-systems).
* gnu/build/linux-boot.scm (%ext2-endianness, %ext2-sblock-magic,
  %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name,
  read-ext2-superblock, ext2-superblock-uuid,
  ext2-superblock-volume-name, disk-partitions,
  partition-label-predicate, find-partition-by-label,
  canonicalize-device-spec, MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC,
  MS_BIND, MS_MOVE, bind-mount, check-file-system,
  mount-flags->bit-mask, mount-file-system): Move to...
* gnu/build/file-systems.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/services/base.scm: Use (gnu build file-systems).
* gnu/services/dmd.scm (dmd-configuration-file): Likewise.
* gnu/system.scm (operating-system-activation-script): Likewise.
* gnu/system/linux-initrd.scm (base-initrd): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2014-09-03 15:43:07 +02:00
Ludovic Courtès 8a9e21d1f7 Rename (gnu build linux-initrd) to (gnu build linux-boot).
* gnu/build/linux-initrd.scm: Rename to...
* gnu/build/linux-boot.scm: ... this.
* gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu/build/activation.scm, gnu/build/vm.scm, gnu/services/base.scm,
  gnu/services/dmd.scm, gnu/system.scm, gnu/system/linux-initrd.scm,
  gnu/system/vm.scm: Adjust accordingly.
2014-09-03 15:43:07 +02:00
Ludovic Courtès 548f7a8fa2 Move operating system helpers from (guix build …) to (gnu build …).
* guix/build/activation.scm, guix/build/install.scm,
  guix/build/linux-initrd.scm, guix/build/vm.scm: Move to...
* gnu/build: ... here.
* Makefile.am (MODULES): Remove the above guix/build/ files.
* gnu-system.am (GNU_SYSTEM_MODULES): Add the above gnu/build/ files
  here.
* gnu/services/base.scm, gnu/services/dmd.scm, gnu/system.scm,
  gnu/system/linux-initrd.scm, gnu/system/vm.scm,
  guix/scripts/system.scm: Adjust to the new module names.
2014-09-03 15:43:07 +02:00
Ludovic Courtès bdb36958fb gnu: Split (gnu packages base), adding (gnu packages commencement).
* gnu/packages/base.scm (gnu-make-boot0, diffutils-boot0,
  findutils-boot0, %boot0-inputs, nix-system->gnu-triplet, boot-triplet,
  binutils-boot0, gcc-boot0, perl-boot0, linux-libre-headers-boot0,
  texinfo-boot0, %boot1-inputs, glibc-final-with-bootstrap-bash,
  cross-gcc-wrapper, static-bash-for-glibc, glibc-final,
  gcc-boot0-wrapped, %boot2-inputs, binutils-final, libstdc++,
  gcc-final, ld-wrapper-boot3, %boot3-inputs, bash-final, %boot4-inputs,
  guile-final, gnu-make-final, ld-wrapper, coreutils-final, grep-final,
  %boot5-inputs, %final-inputs, canonical-package, gcc-toolchain,
  gcc-toolchain-4.8, gcc-toolchain-4.9): Move to...
* gnu/packages/commencement.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* build-aux/check-final-inputs-self-contained.scm: Adjust accordingly.
* gnu/packages/cross-base.scm: Likewise.
* gnu/packages/make-bootstrap.scm: Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/gnu.scm (standard-packages, gnu-build,
  gnu-cross-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* guix/download.scm (url-fetch): Likewise.
* guix/gexp.scm (default-guile): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/monads.scm (run-with-store): Likewise.
* guix/packages.scm (default-guile): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths):
  Likewise.
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh: Likewise.
* gnu/services/base.scm: Use 'canonical-package' instead of xxx-final.
* gnu/services/xorg.scm: Likewise.
* gnu/system/vm.scm: Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2014-08-28 09:21:54 +02:00
Ludovic Courtès 6f22f3c954 linux-initrd: Load fscache.ko before the 9p modules.
* gnu/system/linux-initrd.scm (base-initrd)[virtio-9p-modules]: Add
  "fscache.ko", required by Linux-libre 3.16.
2014-08-15 16:26:28 +02:00
Mark H Weaver 2f7f32003f system: grub: Change the default default-entry to 0.
* gnu/system/grub.scm (<grub-configuration>)[default-entry]: Change the
  default to 0.
2014-08-13 12:56:25 -04:00
Ludovic Courtès c8fa34265d system: Add the 'system?' field for user groups.
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.
2014-07-25 00:12:35 +02:00
Ludovic Courtès 1dac856638 install: Add a configuration template to the image.
* gnu/system/os-config.tmpl: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it
* gnu/system/install.scm (configuration-template-service): New
  procedure.
  (installation-services): Call it.
* doc/guix.texi (System Installation): Mention
  configuration-template.scm, and @include gnu/system/os-config.tmpl.
2014-07-24 23:02:27 +02:00
Ludovic Courtès 83a17b6236 install: Add a service to back the store with the target disk.
Fixes <http://bugs.gnu.org/18061>.
Reported by Adam Pribyl <pribyl@lowlevel.cz>.

* gnu/services/dmd.scm (dmd-configuration-file)[config]: Import (guix
  build utils).
* gnu/system/install.scm (make-cow-store, cow-store-service): New
  procedures.
  (installation-services): Use it.
  (%backing-directory): New variable.
* doc/guix.texi (System Installation): Add the 'deco start cow-store
  /mnt' phase.
2014-07-23 17:47:25 +02:00
Mark H Weaver 705f8b68f1 system: Add missing exports to (gnu system file-systems).
* gnu/system/file-systems.scm (%pseudo-terminal-file-system)
  (%shared-memory-file-system): Add to export list.
2014-07-23 02:13:34 -04:00
Ludovic Courtès db17ae5c27 system: Add /dev/shm.
* gnu/system/file-systems.scm (%shared-memory-file-system): New
  variable.
  (%base-file-systems): Add it.
* doc/guix.texi (File Systems): Document it.
2014-07-23 02:02:07 +02:00
Ludovic Courtès 7f239fd33f system: Add 'file-system' decl. for /dev/pts, and use the right options.
Fixes <http://bugs.gnu.org/18081>.

* gnu/system/file-systems.scm (%devtmpfs-file-system): Add
  'needed-for-boot?' field.
  (%tty-gid, %pseudo-terminal-file-system): New variables.
  (%base-file-systems): Add %PSEUDO-TERMINAL-FILE-SYSTEM.
* gnu/services/base.scm (udev-service): Remove dependency on
  'file-system-/dev'.
* gnu/system/shadow.scm (%base-groups): Add 'id' field for group 'tty'.
* guix/build/linux-initrd.scm (boot-system): Remove 'mount' call for
  /dev/pts.
* doc/guix.texi (File Systems): Add %pseudo-terminal-file-system.
2014-07-23 02:02:07 +02:00
Ludovic Courtès 4e469051a7 system: Add 'create-mount-point?' file system option.
* gnu/system/file-systems.scm (<file-system>)[create-mount-point?]: New
  field.
* gnu/services/base.scm (file-system-service): Add #:create-mount-point?
  parameter and honor it.
* gnu/system.scm (other-file-system-services): Update
  'file-system-service' call accordingly.
* doc/guix.texi (File Systems): Document it.
2014-07-23 02:02:06 +02:00
Ludovic Courtès a69576ea85 system: Add '%devtmpfs-file-system' for udev, and '%base-file-systems'.
Suggested by Adam Pribyl <pribyl@lowlevel.cz>.

* gnu/services/base.scm (udev-service)[requirement]: Add
  'file-system-/dev'.
* gnu/system/file-systems.scm (%devtmpfs-file-system,
  %base-file-systems): New variables.
* gnu/system/install.scm (installation-services)[file-systems]: Use
  %base-file-systems.
* build-aux/hydra/demo-os.scm (file-systems): Likewise.
* doc/guix.texi (System Installation): Show %BASE-FILE-SYSTEMS in the
  example.
  (Using the Configuration System): Likewise.
  (File Systems): Document %base-file-systems, %devtmpfs-file-system,
  %binary-format-file-system, and %fuse-control-file-system.
2014-07-22 16:59:10 +02:00
David Thompson ebc28a7d13 install: Add wireless-tools package.
* gnu/system/install.scm (installation-os): Add wireless-tools to packages.
2014-07-19 09:42:43 -04:00
David Thompson c299dffcc4 linux-initrd: Add AHCI modules.
* gnu/system/linux-initrd (linux-modules): Add them.
2014-07-19 08:41:43 -04:00
Ludovic Courtès 3172ed5a4c install: Show the "System Installation" node.
* gnu/system/install.scm (log-to-info): Go to the new 'System
  Installation' node.
2014-07-17 18:37:53 +02:00
Ludovic Courtès fd1b1fa296 doc: Add "Initial RAM Disk" section.
* doc/guix.texi (Initial RAM Disk): New node.
* gnu/system/linux-initrd.scm (expression->initrd): Adjust docstring.
2014-07-17 17:49:34 +02:00
Ludovic Courtès 62ca0fdf9e services: Add 'console-font-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.
2014-07-17 15:53:01 +02:00
Ludovic Courtès 8f297d422a install: Remove GNU fdisk from the image.
* gnu/system/install.scm (installation-os): Remove FDISK.
2014-07-14 18:06:35 +02:00
Ludovic Courtès 932e1f9240 vm: Make sure disk image initrds load 'usb-storage.ko'.
Reported by David Thompson <dthompson2@worcester.edu>.

* gnu/system/vm.scm (system-disk-image): Add usb-storage.ko to the
  initrd.
2014-07-14 18:05:10 +02:00
Ludovic Courtès fa16f84502 linux-initrd: Allow extra modules to be passed to 'base-initrd'.
* gnu/system/linux-initrd.scm (base-initrd): Add #:extra-modules
  parameter.
2014-07-13 23:43:00 +02:00
Ludovic Courtès 66670cf39c vm: Add support for i686.
Partially fixes <http://bugs.gnu.org/18002>.
Reported by David Thompson <dthompson2@worcester.edu>.

* guix/build/vm.scm (qemu-command): Add optional 'system' parameter.
  Special-case "^i[3456]86$".
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Use it.
2014-07-13 16:37:11 +02:00
Ludovic Courtès da417ffe3b system: Allow root to use 'groupadd' & co. without authenticating.
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.
2014-07-11 23:20:48 +02:00
Ludovic Courtès 715956cc26 system: Add "netdev" group.
* gnu/system/shadow.scm (%base-groups): Add "netdev".
2014-07-11 00:27:27 +02:00