Commit graph

868 commits

Author SHA1 Message Date
Ludovic Courtès
0134ebc55b
install: Provide a meaningful label.
* gnu/system/install.scm (installation-os)[label]: New field.
2019-04-15 12:24:14 +02:00
Ludovic Courtès
66ec389580
vm: Do not mount /xchg with "cache=loose".
Fixes <https://bugs.gnu.org/33639>.

* gnu/system/vm.scm (%linux-vm-file-systems): Remove "cache=loose" for /xchg.
(system-docker-image): Remove 'sync' call, now unneeded, and which was
probably insufficient.
2019-04-14 17:42:08 +02:00
Ludovic Courtès
13fd0a3087
install: Use a font with more glyphs on tty2.
* gnu/system/install.scm (%installation-services): For
'console-font-service-type', use LatGrkCyr-8x16 on tty2.
2019-04-12 17:56:23 +02:00
Ludovic Courtès
c7dc604253
installer: Choosing a locale opens the translated manual on tty2.
Suggested by Florian Pelz.

* gnu/system/install.scm (%installation-node-names): New variable.
(log-to-info): Expect the chosen locale as an argument.  Compute the
language, Info file name, and node name.  Install the locale.
(documentation-shepherd-service): Add 'locale' parameter to the 'start'
action and honor it.  Set GUIX_LOCPATH and TERM as environment variables
for the process.
* gnu/installer.scm (apply-locale): Use (gnu services herd).  Call
'stop-service' and 'start-service' with the chosen locale.
2019-04-12 17:56:23 +02:00
Ludovic Courtès
126d4c12ce
install: Add standalone documentation service.
* gnu/system/install.scm (log-to-info): Add 'tty' and 'user'
parameters.  Open the tty and change UIDs/GIDs.
(documentation-shepherd-service): New procedure.
(%documentation-users, documentation-service-type): New variables.
(%installation-services): Use it instead of 'mingetty-service'.
2019-04-12 17:56:23 +02:00
Ludovic Courtès
5c32857f91
doc: Adjust desktop instructions for GDM.
* gnu/system/examples/desktop.tmpl: Adjust comment that referred to SLiM.
2019-04-10 12:40:58 +02:00
Ludovic Courtès
5a663d87eb
install: Tweak motd.
* gnu/system/install.scm (%installation-services): Tweak motd.
2019-04-07 22:23:51 +02:00
Ludovic Courtès
6fb6dd13b5
install: Remove "GuixSD".
* gnu/system/install.scm (%installation-services): Remove "Guix System
Distribution" from motd.
2019-04-07 22:23:51 +02:00
Ludovic Courtès
305a732a0a
services: xorg: Add 'set-xorg-configuration'.
* gnu/services/xorg.scm (gdm-service-type)[compose, extend]: New fields.
(set-xorg-configuration): New procedure.
* doc/guix.texi (Keyboard Layout): Use it.
(X Window): Document it.
* gnu/system/examples/desktop.tmpl: Add 'keyboard-layout' fields.
2019-04-05 15:39:35 +02:00
Timothy Sample
df2a96167f
gnu: Add example system configuration for asus-c201.
* gnu/system/examples/asus-c201.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-04-03 18:21:43 +02:00
Ludovic Courtès
971e6560eb
system: Fix typo in desktop example.
The typo was introduced in 391e0d65d7.

* gnu/system/examples/desktop.tmpl: Use XFCE-DESKTOP-SERVICE-TYPE, not
XFCE-DESKTOP-SERVICE.
2019-03-28 23:06:59 +01:00
Ludovic Courtès
45c0d1d790
vm: Ask QEMU for more RAM in the VM that makes ISO9660 images.
* gnu/system/vm.scm (iso9660-image): Pass #:memory-size to
'expression->derivation-in-linux-vm'.
2019-03-27 11:54:06 +01:00
Ludovic Courtès
391e0d65d7
services: Deprecate 'xfce-desktop-service'.
* gnu/services/desktop.scm (xfce-desktop-service-type)[default-value]
[description]: New fields.
(xfce-desktop-service): Deprecate.
* gnu/system/examples/desktop.tmpl: Use the (service …) form.
* gnu/installer/services.scm (%desktop-environments): Add TODO comment.
* doc/guix.texi (Desktop Services): Adjust accordingly, and fix spelling
of "Xfce" throughout.
2019-03-27 11:54:06 +01:00
Ludovic Courtès
ee05cc7fe3
services: Deprecate 'gnome-desktop-service'.
* gnu/services/desktop.scm (gnome-desktop-service-type)[default-value]:
New field.
(gnome-desktop-service): Deprecate.
* gnu/installer/services.scm (%desktop-environments): Use the (service …)
form for GNOME.
* gnu/system/examples/desktop.tmpl: Likewise.
* doc/guix.texi (Desktop Services): Adjust accordingly.
2019-03-27 11:54:06 +01:00
Ludovic Courtès
69cae3d335
system: Add 'essential-services' field to <operating-system>.
* gnu/system.scm (<operating-system>)[essential-services]: New field.
(operating-system-directory-base-entries): Remove #:container? keyword
and keep only the not-container branch.
(essential-services): Likewise.
(operating-system-services): Likewise, and call
'operating-system-essential-services' instead of 'essential-services'.
(operating-system-activation-script): Remove #:container?.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Likewise.
* gnu/system/linux-container.scm (container-essential-services): New procedure.
(containerized-operating-system): Use it and set the
'essential-services' field.
(container-script): Remove call to 'operating-system-derivation'.
* gnu/system/vm.scm (system-docker-image): Likewise.
* doc/guix.texi (operating-system Reference): Document 'essential-services'.
2019-03-25 23:37:06 +01:00
Ludovic Courtès
cf848cc0a1
accounts: Add default value for the 'home-directory' field of <user-account>.
* gnu/system/accounts.scm (<user-account>)[home-directory]: Mark as
thunked and add a default value.
(default-home-directory): New procedure.
* doc/guix.texi (User Accounts): Remove 'home-directory' from example.
* gnu/system/examples/bare-bones.tmpl: Likewise.
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/system/examples/desktop.tmpl: Likewise.
* gnu/system/examples/docker-image.tmpl: Likewise.
* gnu/system/examples/lightweight-desktop.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda):
(%separate-home-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* tests/accounts.scm ("allocate-passwd")
("allocate-passwd with previous state"): Likewise.
2019-03-25 23:37:06 +01:00
Ludovic Courtès
ae7a316b9d
system: Initialize console keyboard layout in the initrd.
Partially fixes <https://bugs.gnu.org/25453>.

* gnu/system.scm (<operating-system>)[keyboard-layout]: New field.
(operating-system-initrd-file): Pass #:keyboard-layout to MAKE-INITRD.
* gnu/system/linux-initrd.scm (raw-initrd): Add #:keyboard-layout.
Pass #:keymap-file to 'boot-system'.
(base-initrd): Add #:keyboard-layout.
[helper-packages]: Add LOADKEYS-STATIC when KEYBOARD-LAYOUT is true.
Pass #:keyboard-layout to 'raw-initrd'.
* gnu/build/linux-boot.scm (boot-system): Add #:keymap-file and honor
it.
* doc/guix.texi (operating-system Reference): Document the
'keyboard-layout' field.
(Initial RAM Disk): Update 'raw-initrd' and 'base-initrd' documentation.
2019-03-24 23:06:12 +01:00
Ludovic Courtès
132823c2ac
vm: 'virtualized-operating-system' inherits from the user's bootloader config.
* gnu/system/vm.scm (virtualized-operating-system): Inherit from the
bootloader of OS.
2019-03-24 23:06:11 +01:00
Ludovic Courtès
db1e2522f6
Add (gnu system keyboard).
* gnu/system/keyboard.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu.scm (%public-modules): Add it.
2019-03-24 23:06:11 +01:00
Ludovic Courtès
0dc7d298a3
vm: 'system-docker-image' calls 'sync' before rebooting.
Previously we could end up silently building truncated tarballs.

* gnu/system/vm.scm (system-docker-image)[build]: Add call to 'sync'.
2019-03-22 22:49:35 +01:00
Ludovic Courtès
e6c46ec42e
vm: 'expression->derivation-in-linux-vm' leads to a kernel panic upon failure.
Partially fixes <https://bugs.gnu.org/34276>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]: Call
'exit' when USER-BUILDER exits with a non-zero code.
2019-03-17 16:30:00 +01:00
Ludovic Courtès
b94c80ff5d
linux-container: 'containerized-operating-system' removes "useless" services.
Fixes <https://bugs.gnu.org/34211>.
Reported by Efraim Flashner <efraim@flashner.co.il>.

* gnu/system/linux-container.scm (containerized-operating-system)
[useless-services]: New variable.
Add 'services' field.
2019-03-13 23:12:44 +01:00
Ludovic Courtès
4cd386afae
linux-modules: Factorize 'missing-modules'.
* gnu/build/linux-modules.scm (missing-modules): New procedure.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Use it.
2019-03-13 23:12:43 +01:00
Ludovic Courtès
59e8044588
Remove traces of "GuixSD".
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove
mentions of "GuixSD".
* gnu/bootloader/grub.scm (install-grub-efi): Likewise.
* gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to
"Guix_image".
(initialize-hard-disk): Search for the "Guix_image" label.
* gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD".
* gnu/installer/newt/welcome.scm (run-welcome-page): Likewise.
* gnu/packages/audio.scm (supercollider)[description]: Likewise.
* gnu/packages/curl.scm (curl): Likewise.
* gnu/packages/emacs.scm (emacs): Likewise.
* gnu/packages/gnome.scm (network-manager): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/linux.scm (alsa-plugins): Likewise.
(powertop, wireless-regdb): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/polkit.scm (polkit): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/services/base.scm (file-systems->fstab): Likewise.
* gnu/services/cups.scm (%cups-activation): Likewise.
* gnu/services/mail.scm (%dovecot-activation): Likewise.
* gnu/services/messaging.scm (prosody-configuration)[log]: Likewise.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise.
* gnu/system/install.scm (installation-os)[file-systems]: Change root
file system label to "Guix_image".
* gnu/system/mapped-devices.scm (check-device-initrd-modules):
Remove "GuixSD".
* gnu/system/vm.scm (system-docker-image): Likewise.
(system-disk-image)[root-label]: Change to "Guix_image".
* gnu/tests/install.scm (run-install): Remove "GuixSD".
* guix/modules.scm (guix-module-name?): Likewise.
* nix/libstore/optimise-store.cc: Likewise.
2019-03-13 23:12:43 +01:00
Ludovic Courtès
0ae735bcc8
activation: Build account databases with (gnu build accounts).
* gnu/build/activation.scm (enumerate, current-users, current-groups)
(add-group, add-user, modify-user, ensure-user): Remove.
(activate-users+groups)[touch, activate-user]: Remove.
[make-home-directory]: New procedure.
Rewrite in terms of 'user+group-databases', 'write-group', etc.
* gnu/build/install.scm (directives): Remove "/root".
* gnu/system/shadow.scm (account-activation): Remove (setenv "PATH" ...)
expression, which is now unneeded.
2019-03-07 20:05:09 +01:00
Ludovic Courtès
6061d01512
activation: Operate on <user-account> and <user-group> records.
* gnu/system/accounts.scm (sexp->user-group, sexp->user-account): New
procedures.
* gnu/system/shadow.scm (account-activation): Call them in the arguments
to 'activate-users+groups'.
(account-shepherd-service): Likewise.
* gnu/build/activation.scm (activate-users+groups): Expect a list of
<user-account> and a list of <user-group>.  Replace uses of 'match' on
tuples with calls to record accessors.
(activate-user-home): Likewise.
2019-03-07 20:05:09 +01:00
Ludovic Courtès
f6f67b87c0
system: Add (gnu system accounts).
The (gnu system accounts) module is meant to be used both on the build-
and on the host-side.

* gnu/system/shadow.scm <top level>: Call 'default-shell'.
(<user-account>, <user-group>): Move to...
* gnu/system/accounts.scm: ... here.  New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add system/accounts.scm.
2019-03-07 20:04:02 +01:00
Ludovic Courtès
910d0121a8
pack, vm: Fix incorrect use of 'package-transitive-propagated-inputs'.
In practice the error was not triggered because
'package-transitive-propagated-inputs' currently returns the empty list
for these two packages.

* guix/scripts/pack.scm (gcrypt-sqlite3&co): Remove labels from the
result.
* gnu/system/vm.scm (gcrypt-sqlite3&co): Likewise.
2019-02-11 23:23:28 +01:00
Pierre Neidhardt
9ce09a7698
install: Use (gnu package certs) module for the nss-certs package.
* gnu/system/install.scm: Use (gnu package certs).
2019-02-10 15:30:35 +01:00
Pierre Neidhardt
0b767e3d5b
install: Add nss-certs to the image.
* gnu/system/install.scm (installation-os)[packages]: Add nss-certs.
2019-02-10 15:17:37 +01:00
Pierre Neidhardt
907dd32720
gnu: Replace all cons* with beginner-friendly (append (list ...)).
* gnu/system/examples/bare-bones.tmpl (services): Do it.
* gnu/system/examples/beaglebone.tmpl (packages): Do it.
(services): Do it.
* gnu/system/examples/desktop.tmpl (packages): Do it.
(services): Do it.
* gnu/system/examples/lightweight-desktop.tmpl (file-systems): Do it.
(packages): Do it.
* gnu/system/examples/vm-image.tmpl (packages): Do it.
2019-01-23 18:01:16 +01:00
Pierre Neidhardt
ece2fd1218
gnu: Fix missing EFI entry in "desktop" example.
* gnu/system/examples/desktop.tmpl (file-systems): Add
EFI file-system.
2019-01-23 18:01:16 +01:00
Ludovic Courtès
323f250da7
vm: Remove unnecessary import.
* gnu/system/vm.scm: Remove unnecessary (guix scripts pack) import.
2019-01-22 23:04:05 +01:00
Efraim Flashner
7194745a16
services: Use guix-service-type.
* gnu/services/base.scm (%base-services): Replace guix-service with
guix-service-type.
* gnu/system/examples/docker-image.tmpl (services): Same.
2019-01-20 16:11:00 +02:00
Mathieu Othacehe
a49d633c0c
installer: Move everything to the build side.
* gnu/installer.scm: Rename to ...
* gnu/installer/record.scm: ... this.
* gnu/installer/build-installer.scm: Move everything to the build side and
rename to gnu/installer.scm.
* gnu/installer/newt.scm: Remove all the gexps and add depencies to newt
modules as this code will only be used on the build side by now.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it,
(dist_installer_DATA): New rule to install installer's aux-files.
* gnu/system/install.scm (%installation-services): Use only
'installer-program' from (gnu installer). The installer is now choosen on the
build side.
* guix/self.scm (*system-modules*): Restore previous behaviour and add all
installer files to #:extra-files field of the scheme-node.
* po/guix/POTFILES.in: Adapt it.
2019-01-17 14:04:21 +01:00
Mathieu Othacehe
a79617468e
gnu: installer: Launch the installer as kmscon login-program.
Source /etc/environment just before starting the installer. The login program
is supposed to load the environment variables of this file through PAM, but as
we replace it by the installer, they are no longer available. This is mostly
useful for the LANG environment variable.

* gnu/installer/build-installer.scm (installer-program-launcher): New exported
procedure.
* gnu/system/install.scm (%installation-services): Restore most of the origin
code. kmscon is only started on TTY1, and the graphical installer is the
login-program.
2019-01-17 14:04:21 +01:00
Mathieu Othacehe
d0f3a672dc
gnu: Add graphical installer support.
* configure.ac: Require that guile-newt is available.
* gnu/installer.scm: New file.
* gnu/installer/aux-files/logo.txt: New file.
* gnu/installer/build-installer.scm: New file.
* gnu/installer/connman.scm: New file.
* gnu/installer/keymap.scm: New file.
* gnu/installer/locale.scm: New file.
* gnu/installer/newt.scm: New file.
* gnu/installer/newt/ethernet.scm: New file.
* gnu/installer/newt/hostname.scm: New file.
* gnu/installer/newt/keymap.scm: New file.
* gnu/installer/newt/locale.scm: New file.
* gnu/installer/newt/menu.scm: New file.
* gnu/installer/newt/network.scm: New file.
* gnu/installer/newt/page.scm: New file.
* gnu/installer/newt/timezone.scm: New file.
* gnu/installer/newt/user.scm: New file.
* gnu/installer/newt/utils.scm: New file.
* gnu/installer/newt/welcome.scm: New file.
* gnu/installer/newt/wifi.scm: New file.
* gnu/installer/steps.scm: New file.
* gnu/installer/timezone.scm: New file.
* gnu/installer/utils.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add previous files.
* gnu/system.scm: Export %root-account.
* gnu/system/install.scm (%installation-services): Use kmscon instead of linux
VT for all tty.
(installation-os)[users]: Add the graphical installer as shell of the root
account.
[packages]: Add font related packages.
* po/guix/POTFILES.in: Add installer files.
2019-01-17 14:04:20 +01:00
Ludovic Courtès
5c215c9e47
install: Avoid deprecated 'gpm-service' procedure.
* gnu/system/install.scm (%installation-services): Use the 'service'
form instead of 'gpm-service'.
2019-01-16 14:07:37 +01:00
Ludovic Courtès
84a2de36a1
services: Deprecate a few more service procedures.
These procedures were already either undocumented (and de facto
deprecated) or documented as deprecated or redundant.

* gnu/services/base.scm (guix-service, guix-publish-service): Mark as
deprecated.
* gnu/services/mcron.scm (mcron-service): Likewise.
* gnu/services/networking.scm (tor-service): Likewise.
* doc/guix.texi (Scheduled Job Execution): Remove 'mcron-service' and
adjust example.
(Networking Services): Remove 'tor-service'.
* gnu/tests/base.scm (%mcron-os): Use 'mcron-service-type' instead of
'mcron-service'.
* gnu/tests/networking.scm (%tor-os): Use 'tor-service-type' instead of
'tor-service'.
* tests/guix-system.sh: Likewise.
2019-01-11 12:14:38 +01:00
Efraim Flashner
3c515b2225
doc: Example vm-image doesn't need firmware.
* gnu/system/examples/vm-image.tmpl (firmware): New field, explicitly
empty list.
2018-12-24 11:14:29 +02:00
Ludovic Courtès
0bc02becca
Remove most references to hydra.gnu.org.
* Makefile.am (assert-binaries-available): Don't mention hydra.gnu.org
in comment.
* build-aux/check-available-binaries.scm: Likewise.
* build-aux/check-final-inputs-self-contained.scm: Likewise.
* doc/guix.texi (SUBSTITUTE-SERVER): New variable.
Use it throughout instead of "mirror.hydra.gnu.org".
* doc/contributing.texi (Submitting Patches): Likewise.
* gnu/services/base.scm (hydra-key-authorization)
(guix-activation): Remove mentions of "hydra.gnu.org" in comments and
messages.
* gnu/system/install.scm (%installation-services): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
2018-12-04 10:57:56 +01:00
Laura Lazzati
b9914c4794
doc: Fix "desktop" OS config example.
* gnu/system/examples/desktop.tmpl (file-systems): Add
'file-system-label' call in 'device' field.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2018-12-03 14:27:24 +01:00
Ludovic Courtès
0c17f72070
services: openssh: Install OpenSSH in the system profile.
This ensures one can scp to or from the GuixSD machine that uses the
service.

* gnu/services/ssh.scm (openssh-service-type)[extensions]: Add
PROFILE-SERVICE-TYPE extension.
* gnu/system/examples/bare-bones.tmpl <packages>: Remove OPENSSH.
* doc/guix.texi (Using the Configuration System): Adjust accordingly.
2018-11-26 11:10:20 +01:00
Vagrant Cascadian
74e35e8c94
gnu: Add u-boot-pinebook.
* gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch: New file.
* gnu/packages/patches/u-boot-pinebook-syscon-node.patch: New file.
* gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch: New file.
* gnu/packages/patches/u-boot-pinebook-video-bridge.patch: New file.
* gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch: New file.
* gnu/packages/patches/u-boot-pinebook-dts.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/bootloaders.scm (u-boot-pinebook): New exported variable.
* gnu/bootloader/u-boot.scm (u-boot-pinebook-bootloader): New exported
variable.
* gnu/system/install.scm (pinebook-installation-os): New exported variable.
2018-11-22 21:59:05 +01:00
Ludovic Courtès
d422cbb3d6
linux-initrd: 'expression->initrd' returns the complete file name.
Previously 'expression->initrd' would return the directory that contains
the 'initrd' file; now it returns the complete file name for that file.

* gnu/system/linux-initrd.scm (expression->initrd)[builder]: Change
output file name to "initrd.cpio.gz".  Tail-call 'file-append' to return
the complete file name.
* gnu/system.scm (operating-system-initrd-file): Remove 'file-append'
call.
* gnu/build/linux-initrd.scm (write-cpio-archive): Check whether OUTPUT
already has the ".gz" suffix; rename if before invoking GZIP if it does,
and otherwise after.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)[builder]: Do
not append "/initrd" to #$initrd.
2018-11-21 23:26:59 +01:00
Ludovic Courtès
8bff7dc2ad
vm: Remove explicit calls to 'operating-system-derivation'.
* gnu/system/vm.scm (iso9660-image): Change 'os-drv' to 'os' and remove
call to 'operating-system-derivation'.
(system-qemu-image): Likewise.
(system-qemu-image/shared-store): Likewise.
2018-11-18 23:37:45 +01:00
Ludovic Courtès
9782c82217
system: De-monadify 'operating-system-bootcfg'.
* gnu/system.scm (operating-system-bootcfg): Remove 'mlet*' and
'lower-object' call.
* gnu/system/vm.scm (system-disk-image)
(system-qemu-image/shared-store): Adjust accordingly.
* guix/scripts/system.scm (perform-action): Add 'lower-object' call for
BOOTCFG.
2018-11-18 23:37:45 +01:00
Ludovic Courtès
e34ae75dc1
linux-initrd: Return file-like objects instead of monadic values.
This is an incompatible change visible to users via the 'initrd' field
of 'operating-system'.  However, assuming the user's 'initrd' value
tail-calls to 'raw-initrd' or 'base-initrd', the switch to non-monadic
style is invisible.

* gnu/system/linux-initrd.scm (expression->initrd): Use 'computed-file'
instead of 'gexp->derivation'.
(raw-initrd, base-initrd): Adjust docstring to mention non-monadic
return.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Adjust
accordingly.
* gnu/system.scm (operating-system-directory-base-entries)
(operating-system-initrd-file)
(operating-system-boot-parameters): Adjust accordingly.
* doc/guix.texi (operating-system Reference)
(Initial RAM Disk): Update.
2018-11-18 23:37:44 +01:00
Ludovic Courtès
a7ef45d9de
system: Simplify kernel argument handling.
* gnu/system.scm (bootable-kernel-arguments): Remove 'kernel-arguments'
parameter and return only the base list of kernel arguments.  Rename
'system.drv' to 'system'.
(operating-system-kernel-arguments): Adjust accordingly and remove
'system.drv' parameter.
(read-boot-parameters-file): Adjust accordingly.  Remove 'if params'
since dominating code assumed PARAMS is always true.
(operating-system-boot-parameters): Remove 'system.drv' parameter; add
 #:system-kernel-arguments? instead and honor it.
(operating-system-bootcfg): Adjust accordingly.
(operating-system-boot-parameters-file): Likewise.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Remove
'os-drv' variable.  Adjust call to 'operating-system-kernel-arguments'.
2018-11-18 23:37:44 +01:00
Chris Marusich
2f4d43584c
system: Rename .zlogin to .zprofile.
Reported by Meiyo Peng <meiyo.peng@gmail.com>.

* gnu/system/shadow.scm (default-skeletons): Rename zlogin to zprofile.
2018-10-19 00:45:20 -07:00
Ludovic Courtès
39d7fdce45
services: dhcp-client: Deprecate 'dhcp-client-service' procedure.
* gnu/services/networking.scm (dhcp-client-service-type): Add default
value.
* gnu/system/examples/bare-bones.tmpl: Use (service
dhcp-client-service-type) instead of (dhcp-client-service).
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/tests/base.scm (%avahi-os): Likewise.
* gnu/tests/databases.scm (%memcached-os): Likewise.
(%mongodb-os): Likewise.
* gnu/tests/dict.scm (%dicod-os): Likewise.
* gnu/tests/mail.scm (%opensmtpd-os): Likewise.
(%exim-os): Likewise.
(%dovecot-os): Likewise.
* gnu/tests/messaging.scm (run-xmpp-test): Likewise.
(run-bitlbee-test): Likewise.
* gnu/tests/monitoring.scm (%prometheus-node-exporter-os): Likewise.
* gnu/tests/networking.scm (%inetd-os): Likewise.
(run-iptables-test): Likewise.
* gnu/tests/nfs.scm (%base-os): Likewise.
* gnu/tests/rsync.scm (%rsync-os): Likewise.
* gnu/tests/ssh.scm (run-ssh-test): Likewise.
* gnu/tests/version-control.scm (%cgit-os): Likewise.
(%git-http-os): Likewise.
(%gitolite-os): Likewise.
* gnu/tests/virtualization.scm (%libvirt-os): Likewise.
* gnu/tests/web.scm (%httpd-os): Likewise.
(%nginx-os): Likewise.
(%varnish-os): Likewise.
(%php-fpm-os): Likewise.
(%hpcguix-web-os): Likewise.
(%tailon-os): Likewise.
* tests/guix-system.sh: Likewise.
* doc/guix.texi (Networking Services): Document
'dhcp-client-service-type' and remove 'dhcp-client-service'.
2018-10-18 01:12:22 +02:00
Ludovic Courtès
fce2254711
vm: Use "cache=loose" for all 9p mounts.
This significantly improves read throughput when running things like
"guix hash -r ...".

* gnu/system/vm.scm (%linux-vm-file-systems): Add 'flags' for "store".
Add "cache=loose" to every file system.
2018-09-23 23:34:17 +02:00
Ludovic Courtès
b5460d95e9
vm: Disable deduplication for 'guix system vm-image'.
* gnu/system/vm.scm (qemu-image): Pass #:deduplicate? #f to
'root-partition-initializer'.
2018-09-23 23:34:17 +02:00
Ludovic Courtès
88600acc93
system: Mention '--skip-checks' in initrd diagnostics.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Add note
about '--skip-checks'.
2018-09-23 23:34:16 +02:00
Danny Milosavljevic
e830c9d0b0
gnu: Rename "banana-pi" to "bananapi".
* gnu/bootloader/u-boot.scm (u-boot-banana-pi-m2-ultra-bootloader): Rename
to...
(u-boot-bananapi-m2-ultra-bootloader): ...this.
* gnu/packages/bootloaders.scm (u-boot-banana-pi-m2-ultra): Rename to...
(u-boot-bananapi-m2-ultra): ...this.
* gnu/system/install.scm (banana-pi-m2-ultra-installation-os): Rename to...
(bananapi-m2-ultra-installation-os): ...this.
2018-09-14 21:31:24 +02:00
Ludovic Courtès
1540075c79
vm: Make UUID computation really deterministic.
Fixes <https://bugs.gnu.org/32652>.

* gnu/system/vm.scm (operating-system-uuid)[service-name,
file-system-digest]: New procedures.
Map these over services and file systems and hash the result.
* tests/guix-system.sh: Add test.
2018-09-07 11:40:05 +02:00
Ludovic Courtès
ca71942445
Switch to Guile-Gcrypt.
This removes (guix hash) and (guix pk-crypto), which now live as part of
Guile-Gcrypt (version 0.1.0.)

* guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm,
tests/hash.scm, tests/pk-crypto.scm: Remove.
* configure.ac: Test for Guile-Gcrypt.  Remove LIBGCRYPT and
LIBGCRYPT_LIBDIR assignments.
* m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove.
* README: Add Guile-Gcrypt to the dependencies; move libgcrypt as
"required unless --disable-daemon".
* doc/guix.texi (Requirements): Likewise.
* gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm,
guix/git.scm, guix/http-client.scm, guix/import/cpan.scm,
guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm,
guix/import/gnu.scm, guix/import/hackage.scm,
guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm,
guix/pki.scm, guix/scripts/archive.scm,
guix/scripts/authenticate.scm, guix/scripts/download.scm,
guix/scripts/hash.scm, guix/scripts/pack.scm,
guix/scripts/publish.scm, guix/scripts/refresh.scm,
guix/scripts/substitute.scm, guix/store.scm,
guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm,
tests/builders.scm, tests/challenge.scm, tests/cpan.scm,
tests/crate.scm, tests/derivations.scm, tests/gem.scm,
tests/nar.scm, tests/opam.scm, tests/pki.scm,
tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm,
tests/store.scm, tests/substitute.scm: Adjust imports.
* gnu/system/vm.scm: Likewise.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(expression->derivation-in-linux-vm)[config]: Remove.
(iso9660-image)[config]: Remove.
(qemu-image)[config]: Remove.
(system-docker-image)[config]: Remove.
* guix/scripts/pack.scm: Adjust imports.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(self-contained-tarball)[build]: Call 'make-config.scm' without
 #:libgcrypt argument.
(squashfs-image)[libgcrypt]: Remove.
[build]: Call 'make-config.scm' without #:libgcrypt.
(docker-image)[config, json]: Remove.
[build]: Add GUILE-GCRYPT to the extensions  Remove (guix config) from
the imported modules.
* guix/self.scm (specification->package): Remove "libgcrypt", add
"guile-gcrypt".
(compiled-guix): Remove #:libgcrypt.
[guile-gcrypt]: New variable.
[dependencies]: Add it.
[*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call.
Add #:extensions.
[*config*]: Remove #:libgcrypt from 'make-config.scm' call.
(%dependency-variables): Remove %libgcrypt.
(make-config.scm): Remove #:libgcrypt.
* build-aux/build-self.scm (guile-gcrypt): New variable.
(make-config.scm): Remove #:libgcrypt.
(build-program)[fake-gcrypt-hash]: New variable.
Add (gcrypt hash) to the imported modules.  Adjust load path
assignments.
* gnu/packages/package-management.scm (guix)[propagated-inputs]: Add
GUILE-GCRYPT.
[arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search
path.
2018-09-04 17:25:11 +02:00
Ludovic Courtès
99b78ba498
linux-initrd: Report only missing modules, not all needed modules.
Previously the warning would list all the required modules rather than
just those that are missing.

* gnu/system/mapped-devices.scm (check-device-initrd-modules): Compute
'missing' and report it.
2018-07-29 18:50:28 +02:00
Ludovic Courtès
fcd068e984
linux-initrd: Try several file names when looking up modules.
Fixes <https://bugs.gnu.org/31714>.
Reported by Tonton <tonton@riseup.net>.

* gnu/build/linux-modules.scm (find-module-file): New procedure.
* gnu/system/linux-initrd.scm (flat-linux-module-directory)[build-exp]:
Remove 'lookup' procedure and use 'find-module-file' instead.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Add
comment.
2018-07-29 18:50:28 +02:00
Ludovic Courtès
d2a1cf45f7
linux-initrd: Improve check of initrd modules.
Previously we would not strip the ".ko" suffix if present.

* gnu/build/linux-modules.scm (file-name->module-name): Export.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Use
'file-name->module-name' instead of 'normalize-module-name'.
2018-07-29 18:50:28 +02:00
Ludovic Courtès
10df28d74d
system: '.guile' skeleton now recommends 'guile-colorized'.
* gnu/system/shadow.scm (default-skeletons)[".guile"]: Recommend
'guile-colorized'.
2018-07-23 12:25:31 +02:00
Ludovic Courtès
264967c883
install: Add service for the loopback device.
Lack of a loopback device prevented the system from building starting
from commit 363c946b36.

* gnu/system/install.scm (%installation-services): Add
'static-networking-service-type' instance for 'lo'.
2018-07-20 18:03:11 +02:00
Ludovic Courtès
fc0e663f78
doc: Improve UEFI/BIOS bootloader documentation.
Partly fixes <https://bugs.gnu.org/30312>.

* doc/guix.texi (Preparing for Installation): Add note on how to choose
between UEFI and BIOS.
(Using the Configuration System)[Bootloader]: New subsubsection.
(Bootloader Configuration): Expound on the bootloader type and target.
* gnu/system/examples/desktop.tmpl: Switch to UEFI.
* gnu/system/examples/bare-bones.tmpl: Explicitly mention "legacy" and
"BIOS" in the comments.
2018-07-05 11:44:46 +02:00
Ludovic Courtès
9fd877247d
system: Default .bashrc uses '--color=auto' for grep and ls.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>
and Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

* gnu/system/shadow.scm (default-skeletons)["bashrc"]: Use
'--color=auto' instead of '--color'.
2018-07-04 21:52:23 +02:00
Danny Milosavljevic
4ce4fc5010
system: Add os-with-u-boot.
* gnu/system/install.scm (os-with-u-boot): New procedure.
* gnu/packages/bootloaders.scm (make-u-boot-package): Export.
* doc/guix.texi (Building the Installation Image for ARM Boards): New
subsection.
2018-06-15 14:16:37 +02:00
Ludovic Courtès
411959bef3
linux-initrd: Module check correctly handles hyphen vs. underscore.
Fixes <https://bugs.gnu.org/31714>.
Reported by Vagrant Cascadian <vagrant@debian.org>
and Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/system/mapped-devices.scm (check-device-initrd-modules): Pass
LINUX-MODULES through 'normalize-module-name'.
* gnu/build/linux-modules.scm (normalize-module-name): Export.
2018-06-14 23:34:59 +02:00
Ludovic Courtès
c45477d2a1
install: Use (guix store database) instead of 'guix-register'.
* gnu/build/install.scm (register-closure): Add #:reset-timestamps? and
and #:schema; honor them.  Rewrite in terms of 'register-path'.
(populate-single-profile-directory): Add #:schema and honor it.  Make
/var/guix/profiles and /var/guix/gcroots.
* gnu/build/vm.scm (root-partition-initializer): Pass
 #:reset-timestamps? to 'register-closure'.
* gnu/system/vm.scm (not-config?): New procedure.
(guile-sqlite3&co): New variable.
(expression->derivation-in-linux-vm)[config]: New variable.
[builder]: Use 'with-extensions'.
(iso9660-image)[schema, config]: New variables.
Wrap build expression in 'with-extensions'; add 'sql-schema' call.
Remove GUIX from INPUTS.
(qemu-image)[schema, config]: New variables.
Wrap body in 'with-extensions'.
(system-docker-image)[not-config?]: Remove.
[config]: Use 'make-config.scm'.
[schema]: New variable.
[build]: Use 'with-extensions'.  Add call to 'sql-schema'.  Remove GUIX
from INPUTS.
* gnu/system/file-systems.scm (%store-prefix): Check whether
'%store-prefix' is defined.
* guix/scripts/pack.scm (self-contained-tarball)[not-config?]
[libgcrypt, schema]: New variables.
[build]: Wrap in 'with-extensions'.  Adjust imported module list to use
'make-config.scm' for (guix config).
2018-06-14 11:16:59 +02:00
Ludovic Courtès
be43c08b17
vm: 'expression->derivation-in-linux-vm' code can now use dlopen.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)
[user-builder]: Define in non-monadic style as 'program-file'.
[loader]: Likewise, and 'execl' USER-BUILDER instead of loading it.
(system-docker-image): Pass BUILD as the second
argument to 'expression->derivation-in-linux-vm'.
(make-iso9660-image, qemu-image): Remove call to 'reboot'.
2018-06-14 11:16:59 +02:00
Ludovic Courtès
6892f0a247
store-copy: 'read-reference-graph' returns a list of records.
The previous implementation of 'read-reference-graph' was good enough
for many use cases, but it discarded the graph structure, which is
useful information in some cases.

* guix/build/store-copy.scm (<store-info>): New record type.
(read-reference-graph): Rewrite to return a list of <store-info>.
(closure-size, populate-store): Adjust accordingly.
* gnu/services/base.scm (references-file): Adjust accordingly.
* gnu/system/vm.scm (system-docker-image): Likewise.
* guix/scripts/pack.scm (squashfs-image, docker-image): Likewise.
* tests/gexp.scm ("gexp->derivation #:references-graphs"): Likewise.
2018-06-14 11:16:58 +02:00
Ludovic Courtès
b19950a184
system: Default .bashrc now sources /etc/bashrc.
This is a followup to commit 1382bde93c,
which disabled automatic sourcing of /etc/bashrc by interactive shell.
The noticeable effect of the change would be that Bash completion would
only work in login shells.

* gnu/system/shadow.scm (default-skeletons)["bashrc"]: Source
/etc/bashrc.
2018-06-11 18:23:24 +02:00
Ludovic Courtès
fb126314f8
vm: 'iso9660-image' uses a local /tmp.
Fixes <https://bugs.gnu.org/31752>.
Regression introduced in commit 8c9bf2946a.

* gnu/system/vm.scm (iso9660-image): Pass #:file-systems to
'expression->derivation-in-linux-vm'.
2018-06-08 15:23:39 +02:00
Ludovic Courtès
50e53c1c67
vm: 'expression->derivation-in-linux-vm' takes a #:file-systems parameter.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
 #:file-systems and use it instead of %LINUX-VM-FILE-SYSTEMS.
2018-06-08 15:23:39 +02:00
Ludovic Courtès
9f160a0d3c
vm: Use 'with-extensions'.
* gnu/system/vm.scm (system-docker-image)[build]: Use
'with-extensions'.  Remove 'add-to-load-path' calls.
2018-06-01 15:21:28 +02:00
Ludovic Courtès
201f2c8769
vm: Remove unneeded dependency on Guile-JSON.
Fixes <https://bugs.gnu.org/31581>.
Reported by Leo Famulari <leo@famulari.name>.

* gnu/system/vm.scm: Remove unneeded (guix docker) import.
2018-05-29 18:29:36 +02:00
Vagrant Cascadian
6fe1657705
system: Add u-boot-puma-rk3399.
* gnu/packages/bootloaders.scm (u-boot-puma-rk3399): New variable.
(make-u-boot-package)[arguments]: Add '.rksd' files to the files installed
during custom 'install phase.
* gnu/bootloader/u-boot.scm (u-boot-puma-rk3399-bootloader):
New exported variable.
* gnu/system/install.scm (rk3399-puma-installation-os):
New exported variable.
* gnu/packages/firmware.scm (arm-trusted-firmware-puma-rk3399): New variable.
(rk3399-cortex-m0): New variable.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2018-05-29 10:46:13 +02:00
Ludovic Courtès
9ceeca0880
system: Remove uses of the 'title' field of <file-system>.
* gnu/system/install.scm (installation-os): Remove uses of the 'title'
field of 'file-system'; use 'file-system-label' as appropriate.
* gnu/system/vm.scm (system-disk-image, system-qemu-image): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-extlinux-os)
(%minimal-os-on-vda, %separate-home-os, %separate-store-os)
(%raid-root-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* gnu/build/shepherd.scm (default-mounts)[tmpfs]: Likewise.
* tests/guix-system.sh: Likewise.
* tests/system.scm (%root-fs): Likewise.
("operating-system-boot-mapped-devices, implicit dependency"): Likewise.
2018-05-28 13:24:19 +02:00
Ludovic Courtès
a5acc17a3c
file-systems: Remove 'title' field and add <file-system-label>.
The 'title' field was easily overlooked and was an endless source of
confusion.  Now, the value of the 'device' field is self-contained.

* gnu/system/file-systems.scm (<file-system>): Change constructor name
to '%file-system'.
[title]: Remove.
(<file-system-label>): New record type with printer.
(report-deprecation, device-expression)
(process-file-system-declaration, file-system): New macros.
(file-system-title): New procedure.
(file-system->spec, spec->file-system): Adjust to handle
<file-system-label>.
* gnu/system.scm (bootable-kernel-arguments): Add case for
'file-system-label?'.
(read-boot-parameters): Likewise.
(mapped-device-user): Avoid 'file-system-title'.
(fs->boot-device): Remove.
(operating-system-boot-parameters): Use 'file-system-device' instead of
'fs->boot-device'.
(device->sexp): Add case for 'file-system-label?'.
* gnu/bootloader/grub.scm (grub-root-search): Add case for
'file-system-label?'.
* gnu/system/examples/bare-bones.tmpl,
gnu/system/examples/beaglebone-black.tmpl,
gnu/system/examples/lightweight-desktop.tmpl,
gnu/system/examples/vm-image.tmpl: Remove uses of 'title'.
* gnu/system/vm.scm (virtualized-operating-system): Remove uses of
'file-system-title'.
* guix/scripts/system.scm (check-file-system-availability): Likewise,
and adjust fix-it hint.
(check-initrd-modules)[file-system-/dev]: Likewise.
* gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title'
parameter.
[canonical-title]: Remove.
Match on SPEC's type rather than on CANONICAL-TITLE.
(mount-file-system): Adjust caller.
* gnu/build/linux-boot.scm (boot-system): Interpret ROOT here.
* gnu/services/base.scm (file-system->fstab-entry): Remove use of
'file-system-title'.
* doc/guix.texi (File Systems): Remove documentation of the 'title'
field.  Rewrite documentation of 'device' and document
'file-system-label'.
2018-05-28 13:24:11 +02:00
Ludovic Courtès
56f9d442e0
vm: Use a deterministic file system UUID in shared-store VMs.
* gnu/system/vm.scm (system-qemu-image/shared-store): Pass
 #:file-system-uuid to 'qemu-image'.
2018-05-23 10:21:02 +02:00
Ludovic Courtès
d282388789
linux-initrd: Enable "virtio-rng".
Fixes <https://bugs.gnu.org/31268>.

* gnu/system/linux-initrd.scm (default-initrd-modules)[virtio-modules]:
Add "virtio-rng".
2018-05-23 10:21:02 +02:00
Ludovic Courtès
263c9941a1
uuid: 'uuid' returns #f when 'string->uuid' returns #f.
* gnu/system/uuid.scm (uuid): When STR is not a literal, return #f when
'string->uuid' returns #f.
* tests/uuid.scm ("uuid, dynamic value"): New test.
2018-05-19 00:14:52 +02:00
Ludovic Courtès
a48d345041
file-systems: Do not export <file-system>.
* gnu/system/file-systems.scm (<file-system>): Do not export.
* gnu/system.scm (operating-system-root-file-system): Use an accessor
instead of 'match'.
2018-05-19 00:14:52 +02:00
Vagrant Cascadian
9f7d666566
system: Add u-boot-pine64-plus installer.
* gnu/bootloader/u-boot.scm (u-boot-pine64-plus-bootloader):
New exported variable.
* gnu/system/install.scm (pine64-plus-installation-os):
New exported variable.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2018-05-18 20:21:30 +02:00
Vagrant Cascadian
1b960787e2
system: Add u-boot-novena installer.
* gnu/packages/bootloaders.scm (u-boot-novena):
  New variable.
* gnu/bootloader/u-boot.scm (u-boot-novena-bootloader):
  New exported variable.
* gnu/system/install.scm (novena-installation-os):
  New exported variable.
2018-05-11 12:25:43 +02:00
Vagrant Cascadian
fd5536e32b
system: Add wandboard installer.
* gnu/bootloader/u-boot.scm (u-boot-wandboard-bootloader):
  New exported variable.
* gnu/system/install.scm (wandboard-installation-os):
  New exported variable.
2018-05-11 12:25:25 +02:00
Vagrant Cascadian
07ca90458f
system: Add mx6cuboxi installer.
* gnu/bootloader/u-boot.scm (u-boot-mx6cuboxi-bootloader):
  New exported variable.
* gnu/system/install.scm (mx6cuboxi-installation-os):
  New exported variable.
2018-05-11 12:25:25 +02:00
Ludovic Courtès
df1eaffc36
file-systems: Expound '%pseudo-file-system-types'.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/system/file-systems.scm (%pseudo-file-system-types): Add
"debugfs", "efivarfs", "hugetlbfs", "overlay", and "securityfs".
2018-04-29 17:55:08 +02:00
Ludovic Courtès
6ddb59607b
guix system: Report wrong file system 'device' fields.
Previously, if you wrote (device "my-label") without (title 'label),
you'd get:

  guix system: error: stat: No such file or directory: "my-label"

Now you get a proper error and a hint.

Reported by Pierre-Antoine Rouby.

* guix/scripts/system.scm (check-file-system-availability)[literal]: New
variable.  Loop over LITERAL.
* gnu/system/file-systems.scm (%pseudo-file-system-types): New variable.
* guix/ui.scm (display-hint): Make public.
2018-04-27 18:45:02 +02:00
Ludovic Courtès
76a77ccaed
system: Add default '.nanorc' with syntax highlighting.
* gnu/system/shadow.scm (default-skeletons): Add ".nanorc".
2018-04-04 23:14:35 +02:00
Ludovic Courtès
f7a5cf7a2d
nss: Remove '%compat' from the defaults.
* gnu/system/nss.scm (%compat): Add comment.
(<name-service-switch>)[group, password, shadow]: Remove %COMPAT from
the default value.
2018-03-27 23:26:15 +02:00
Chris Marusich
a335f6fcc9
system: Add "guix system docker-image" command.
* gnu/system/vm.scm (system-docker-image): New procedure.
* guix/scripts/system.scm (system-derivation-for-action): Add a case for
  docker-image, and in that case, call system-docker-image.
  (show-help): Document docker-image.
  (guix-system): Parse arguments for docker-image.
* doc/guix.texi (Invoking guix system): Document "guix system
  docker-image".
* gnu/system/examples/docker-image.tmpl: New file.
2018-03-24 03:04:11 +01:00
Chris Marusich
8c9bf2946a
gnu: When building in a VM, share a temporary directory.
* gnu/build/vm.scm (load-in-linux-vm): Make a shared temporary directory
  available in the VM.
* gnu/system/vm.scm (%linux-vm-file-systems): Add a corresponding entry.
2018-03-24 03:04:10 +01:00
Ludovic Courtès
248db51c7e
vm: Display a backtrace upon error by default.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
 #:on-error to 'base-initrd'.
2018-03-18 22:34:40 +01:00
Mark H Weaver
3e5783e292
linux-initrd: Autoload known-module-aliases, again.
Fixes a regression introduced in 8ab10c19d7.

* gnu/system/mapped-devices.scm: Autoload 'known-module-aliases'.
2018-03-15 23:08:02 -04:00
Ludovic Courtès
8ab10c19d7
linux-initrd: Move 'check-device-initrd-modules' elsewhere.
This mostly reverts ca23693d28, which
introduced a circular dependency between (gnu system linux-initrd)
and (gnu system mapped-devices).

Reported by Eric Bavier.

* gnu/system/linux-initrd.scm (check-device-initrd-modules): Move to...
* gnu/system/mapped-devices.scm (check-device-initrd-modules): ... here.
* po/guix/POTFILES.in: Adjust accordingly.
2018-03-15 23:46:16 +01:00
Ludovic Courtès
bb3062ad62
services: Add 'virtual-terminal'.
Fixes <https://bugs.gnu.org/30505>.
Suggested by Danny Milosavljevic <dannym@scratchpost.org>.

* gnu/services/base.scm (unicode-start): Remove.
(virtual-terminal-service-type): New variable.
(console-font-shepherd-services): Remove 'modules'; remove call to
'unicode-start'.  Add 'virtual-terminal' to 'requirement'.
(mingetty-shepherd-service, kmscon-service-type): Likewise.
(%base-services): Add 'virtual-terminal-service-type'.
* gnu/system/install.scm (%installation-services): Likewise.
2018-03-15 11:37:18 +01:00
Danny Milosavljevic
0803ddf267
linux-initrd: Autoload known-module-aliases.
* gnu/system/linux-initrd.scm: Autoload known-module-aliases.
2018-03-10 09:23:00 +01:00
Ludovic Courtès
8d5c14edf5
linux-initrd: Skip initrd module check when 'modules.alias' can't be found.
Fixes <https://bugs.gnu.org/30760>.
Reported by Tomáš Čech <sleep_walker@gnu.org>.

* gnu/system/linux-initrd.scm (check-device-initrd-modules): Call
'known-module-aliases' and catch 'system-error around it.  Pass it to
'matching-modules'.
2018-03-10 00:15:59 +01:00
Ludovic Courtès
dffc5ab5e4
vm: Use 9p mount tags below 32 chars.
Fixes <https://bugs.gnu.org/30667>.
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

* gnu/system/vm.scm (file-system->mount-tag): Use 'sha1' to compute the
tag.
2018-03-08 11:56:20 +01:00
Ludovic Courtès
abfbdafd0e
linux-initrd: Add a hint for the missing module error.
* gnu/system/linux-initrd.scm (check-device-initrd-modules): Add a
'&fix-hint'.
2018-03-07 11:22:42 +01:00
Ludovic Courtès
ca23693d28
linux-initrd: Factorize 'check-device-initrd-modules'.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Move to...
* gnu/system/linux-initrd.scm (check-device-initrd-modules): ... here.
New procedure.
* po/guix/POTFILES.in: Add it.
* guix/scripts/system.scm (check-initrd-modules)[check-device]: Remove.
Use 'check-device-initrd-modules' instead.
2018-03-07 11:22:42 +01:00
Ludovic Courtès
6c4458172d
services: file-systems: Include 'user-file-systems' service.
Previously the KNOWN-FS value used in 'essential-services' would be
incomplete: it would lack all the file systems provided by services that
extend 'file-system-service-type' (/sys/fs/cgroup,
/proc/sys/fs/binfmt_misc, etc.)  Consequently, upon shutdown,
'user-processes' would unmount these file systems before their
corresponding service had been stopped; when their corresponding (e.g.,
'file-system-/proc/sys/fs/binfmt_misc') was stopped, its 'umount' call
would fail.

This was harmless in practice, but this patch makes sure things work as
intended and file systems are unmounted in the right order.

* gnu/services/base.scm (file-system-shepherd-services): Instantiate
'user-file-systems' Shepherd service from here.
(user-unmount-service-type, user-unmount-service): Remove.
* gnu/system.scm (essential-services): Remove call to 'user-unmount-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust comment.
2018-03-07 11:22:42 +01:00
Ludovic Courtès
eac026e5c8
linux-initrd: Add virtio modules to '%base-initrd-modules'.
Fixes a regression in installation tests, whereby 'guix system init'
would report that virtio modules are missing for the target devices.
In practice virtio modules were always available since 'base-initrd' was
always called with #:virtio? #t.  This commit simply moves them to
'%base-initrd-modules' so that 'guix system' knows they're available.

Reported by Danny Milosavljevic <dannym@scratchpost.org> at
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30629#112>.

* gnu/system/linux-initrd.scm (default-initrd-modules): Add virtio
modules.
(base-initrd): Remove #:virtio? and 'virtio-modules'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)
(system-qemu-image, virtualized-operating-system): Remove uses of
 #:virtio?.
* doc/guix.texi (Initial RAM Disk): Update 'base-initrd' doc.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
f850e0da8e
system: beaglebone-black: Use 'initrd-modules'.
* gnu/system/examples/beaglebone-black.tmpl: Use 'initrd-modules'
instead of 'initrd'.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
5a3716aebf
vm: Add missing modules to the 'expression->derivation-in-linux-vm' initrd.
Fixes a regression introduced in
bc499b113a, whereby the default initrd
used by 'expression->derivation-in-linux-vm' would lack all the usual
modules: virtio, nls_iso8859-1, etc.

* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
 #:linux-modules to 'base-initrd'.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
3cb3a4e6e5
linux-initrd: 'file-system-modules' returns the right module list.
Fixes a bug whereby, for an "iso9660" file system, it would return
'("iso9660" "isofs"), i.e., both the key and the value.

Reported by Danny Milosavljevic <dannym@scratchpost.org>
at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30629#115>.

* gnu/system/linux-initrd.scm (lookup-procedure): 'vhash-assoc' returns
a key/value pair; match it.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
424cea8083
guix system: Check for the lack of modules in the initrd.
* guix/scripts/system.scm (check-mapped-devices): Take an OS instead of
a list of <mapped-device>.  Pass #:needed-for-boot? and #:initrd-modules
to CHECK.
(check-initrd-modules): New procedure.
(perform-action): Move 'check-mapped-devices' call first.  Add call to
'check-initrd-modules'.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): New
procedure.
(check-luks-device): Add #:initrd-modules and #:needed-for-boot?.  Use
them to call 'check-device-initrd-modules'.
2018-03-02 13:53:15 +01:00
Ludovic Courtès
bc499b113a
system: Add 'initrd-modules' field.
* gnu/system.scm (<operating-system>)[initrd-modules]: New field.
(operating-system-initrd-file): Pass #:linux-modules to 'make-initrd'.
* gnu/system/linux-initrd.scm (default-initrd-modules): New procedure.
(%base-initrd-modules): New macro.
(base-initrd): Add #:linux-modules and honor it.
* gnu/system/install.scm (embedded-installation-os): Use
'initrd-modules' instead of 'initrd'.
* gnu/tests/install.scm (%raid-root-os): Likewise.
* doc/guix.texi (operating-system Reference): Add 'initrd-modules'.
(Initial RAM Disk): Document it.  Adjust example to not use
 #:extra-modules.
2018-03-02 13:53:10 +01:00
Ludovic Courtès
615a89e310
linux-initrd: Separate file system module logic.
* gnu/system/linux-initrd.scm (vhash, lookup-procedure): New macros.
(file-system-type-modules, file-system-modules): New procedures.
(base-initrd)[cifs-modules, virtio-9p-modules]: Remove.
[file-system-type-predicate]: Remove.
Use 'file-system-modules' instead of 'find' +
'file-system-type-predicate'.
2018-03-02 13:46:45 +01:00
Mark H Weaver
150062f190
Merge branch 'master' into core-updates 2018-02-16 13:14:26 -05:00
Danny Milosavljevic
5a9902c8ac
services: agetty: Add agetty instance to base services. Make its tty optional.
* gnu/services/base.scm (%base-services): Instantiate agetty-service.
(default-serial-port): New variable.
(agetty-shepherd-service): Make tty optional, default to the above.
* doc/guix.texi (agetty-configuration): Update "tty" documentation.
* gnu/system/install.scm (agetty-default-service): Delete variable.
(embedded-installation-os): Remove agetty-default-service instance.
Add "console" kernel-argument.
2018-02-15 12:05:21 +01:00
Marius Bakke
bee7bb315c
Merge branch 'master' into core-updates 2018-02-01 13:18:47 +01:00
Mark H Weaver
e0e10e2f58
gnu: linux-libre: NVME core support is now built-in.
* gnu/system/linux-initrd.scm (base-initrd)[linux-modules]: Remove "nvme".
* gnu/packages/aux-files/linux-libre/4.1-i686.conf,
gnu/packages/aux-files/linux-libre/4.1-x86_64.conf,
gnu/packages/aux-files/linux-libre/4.4-i686.conf,
gnu/packages/aux-files/linux-libre/4.4-x86_64.conf: Set CONFIG_BLK_DEV_NVME=y.
* gnu/packages/aux-files/linux-libre/4.9-i686.conf,
gnu/packages/aux-files/linux-libre/4.9-x86_64.conf,
gnu/packages/aux-files/linux-libre/4.14-arm.conf,
gnu/packages/aux-files/linux-libre/4.14-i686.conf,
gnu/packages/aux-files/linux-libre/4.14-x86_64.conf: Set CONFIG_BLK_DEV_NVME=y
and CONFIG_NVME_CORE=y.
2018-01-30 03:51:11 -05:00
Mark H Weaver
6d5a65de7f
system: Put locales where libc will find them.
* gnu/system/locale.scm (localedef-command, single-locale-directory): Use only
the major+minor part of the libc version number in the locale directory name.
2018-01-24 11:18:49 -05:00
Mark H Weaver
a102d359a6
Merge branch 'master' into core-updates 2018-01-23 17:01:07 -05:00
Danny Milosavljevic
0db22b32ce
system: Rename a20-olinuxino-lime-sd-installation-os.
* gnu/system/install.scm (a20-olinuxino-lime-sd-installation-os): Rename to...
(a20-olinuxino-lime-installation-os): ...this.
2018-01-23 12:01:11 +01:00
Danny Milosavljevic
c55c698594
system: Add A20 OLinuXino LIME installer.
* gnu/bootloader/u-boot.scm (u-boot-a20-olinuxino-lime-bootloader):
New exported variable.
* gnu/packages/bootloaders.scm (u-boot-a20-olinuxino-lime):
New exported variable.
* gnu/system/install.scm (a20-olinuxino-lime-installation-os):
New exported variable.
2018-01-22 22:53:08 +01:00
Ludovic Courtès
30875d07ef
doc: No longer mention Wicd in OS examples.
* gnu/system/examples/desktop.tmpl,
gnu/system/examples/lightweight-desktop.tmpl: Mention NetworkManager
instead of Wicd.
2018-01-21 00:24:03 +01:00
Danny Milosavljevic
84ee33787e
system: Add Nintendo NES Classic Edition installer.
* gnu/bootloader/u-boot.scm (u-boot-nintendo-nes-classic-edition-bootloader):
New exported variable.
* gnu/packages/bootloaders.scm (u-boot-nintendo-nes-classic-edition):
New exported variable.
* gnu/system/install.scm (nintendo-nes-classic-edition-installation-os):
New exported variable.
2018-01-20 22:50:56 +01:00
Danny Milosavljevic
fccdc8c839
system: Factor out embedded-installation-os.
* gnu/system/install.scm (embedded-installation-os): New variable.
(beaglebone-black-installation-os): Use it.
(a20-olinuxino-lime2-emmc-installation-os): Use it.
(a20-olinuxino-micro-installation-os): Use it.
(banana-pi-m2-ultra-installation-os): Use it.
2018-01-20 22:50:56 +01:00
Danny Milosavljevic
8bac66deab
system: Factor out agetty-default-service.
* gnu/system/install.scm (agetty-default-service): New variable.
(beaglebone-black-installation-os): Use it.
(a20-olinuxino-lime2-emmc-installation-os): Use it.
(a20-olinuxino-micro-installation-os): Use it.
(banana-pi-m2-ultra-installation-os): Use it.
2018-01-20 22:50:55 +01:00
Danny Milosavljevic
a7bb327e3c
system: Add A20 OLinuXino MICRO installer.
* gnu/bootloader/u-boot.scm (u-boot-a20-olinuxino-micro-bootloader): New
exported variable.
* gnu/packages/bootloaders.scm (u-boot-a20-olinuxino-micro): New exported
variable.
* gnu/system/install.scm (a20-olinuxino-micro-installation-os): New exported
variable.
2018-01-20 22:50:55 +01:00
Danny Milosavljevic
4b9e9abb36
system: Add A20 OLinuXino LIME2 installer.
* gnu/bootloader/u-boot.scm (u-boot-a20-olinuxino-lime2-bootloader): New
exported variable.
* gnu/packages/bootloaders.scm (u-boot-a20-olinuxino-lime2): New exported
variable.
* gnu/system/install.scm (a20-olinuxino-lime2-emmc-installation-os): New exported
variable.
2018-01-20 22:50:55 +01:00
Danny Milosavljevic
30aeb846d7
system: Add Banana Pi M2 Ultra installer.
* gnu/bootloader/u-boot.scm (u-boot-banana-pi-m2-ultra-bootloader): New
exported variable.
(install-allwinner-u-boot): New variable.
(u-boot-allwinner-bootloader): New variable.
* gnu/packages/bootloaders.scm (u-boot-banana-pi-m2-ultra): New exported
variable.
* gnu/system/install.scm (banana-pi-m2-ultra-installation-os): New exported
variable.
2018-01-20 20:33:10 +01:00
Mark H Weaver
e074a655dd
Merge branch 'master' into core-updates 2018-01-19 23:59:20 -05:00
Tobias Geerinckx-Rice
162a137400
gnu: Consistently Write ‘file system(s)’.
It is the GNU way.

* doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’.
* gnu/build/vm.scm (create-ext-file-system, create-fat-file-system):
Likewise.
* gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise.
* gnu/packages/check.scm (python-testpath)[description]: Likewise.
* gnu/packages/disk.scm (pydf)[description]: Likewise.
* gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise.
(glusterfs)[description]: Likewise.
* gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap)
(ghc-system-fileio)[synopsis]: Likewise.
(ghc-fsnotify)[description]: Likewise.
* gnu/packages/linux.scm (proot)[description]: Likewise.
(jmtpfs)[synopsis, description]: Likewise.
* gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise.
* gnu/packages/storage.scm (ceph)[description]: Likewise.
* gnu/packages/sync.scm (lsyncd)[description]: Likewise.
* gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise.
(go-github-com-zillode-notify)[description]: Likewise.
* gnu/services/nfs.scm (pipefs-service-type): Likewise.
* guix/scripts/system.scm (perform-action): Likewise.
2018-01-19 17:28:31 +01:00
Leo Famulari
4adb40bffc
Merge branch 'master' into core-updates 2018-01-11 14:22:50 -08:00
Ludovic Courtès
b0de7fdba6
system: Extend .gdbinit to authorize extensions from /gnu/store/*/lib.
* gnu/system/shadow.scm (default-skeletons)["gdbinit"]: Add 'auto-load
safe-path' statement.
2018-01-09 23:39:02 +01:00
Ludovic Courtès
aeed74f370
linux-boot: Add #:on-error for initrd error handling.
Suggested by Danny Milosavljevic <dannym@scratchpost.org>
in <https://bugs.gnu.org/29922>.

* gnu/build/linux-boot.scm (boot-system): Add #:on-error parameter and
pass it to 'call-with-error-handling'.
* gnu/system/linux-initrd.scm (raw-initrd): Add #:on-error and pass it.
(base-initrd): Likewise.
2018-01-08 23:44:07 +01:00
Ludovic Courtès
61b94b8c32
vm: 'vm-image' images refer to the root file system by UUID.
This avoids the hard-coded "/dev/sda1", which only made sense when the
image is run with "qemu-system-x86_64 -hda", not when it's passed to
Xen, etc.

Reported by Andreas Enge <andreas@enge.fr>.

* gnu/system/vm.scm (system-qemu-image): Define 'root-uuid', use it as
the 'device' field for "/", and pass it to 'qemu-image'.
2018-01-07 15:09:05 +01:00
Efraim Flashner
23de2e1d5f
Merge remote-tracking branch 'origin/master' into core-updates 2017-12-31 14:10:25 +02:00
Mathieu Othacehe
2cf5f4c144
file-systems: Move %control-groups from %base-file-systems to
%elogind-file-systems.

* gnu/system/file-systems.scm (%base-file-systems): Move %control-groups from
here, to ...
(%elogind-file-systems): ... here.
2017-12-22 15:03:10 +01:00
Mathieu Othacehe
c729225b0f
file-systems: Do not mount hugetlb cgroup filesystem.
On ARM32 without LPAE support, hugetlb control group is not supported.
As it is not needed by elogind, remove it for all platforms.

* gnu/system/file-systems.scm (%control-groups): Remove hugetlb from control
  groups platforms.
2017-12-22 15:03:10 +01:00
Ludovic Courtès
42ff7d3be6
mapped-devices: 'luks-device-mapping' checks its source device.
* gnu/system/mapped-devices.scm (check-luks-device): New procedure.
(luks-device-mapping)[check]: New field.
2017-12-22 09:48:38 +01:00
Ludovic Courtès
4ca90ff597
mapped-devices: Add 'location' and 'check' fields.
* gnu/system/mapped-devices.scm (<mapped-device>)[location]: New field.
(<mapped-device-type>)[check]: New field.
2017-12-22 09:48:36 +01:00
Mathieu Othacehe
a468f89743
system: examples: Add missing initrd to beaglebone-black.tmpl.
* gnu/system/examples/beaglebone-black.tmpl (operating-system): Add the
  initrd with "omap_hsmmc" as an extra-module.
2017-12-22 08:49:57 +01:00
Marius Bakke
32cd878be0
Merge branch 'master' into core-updates 2017-12-19 01:42:40 +01:00
Mathieu Othacehe
9f1e39d1fc
system: examples: Add a template for BeagleBone Black.
* gnu/system/examples/beaglebone-black.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.
* gnu/system/install.scm (/etc/configuration-files): Add it.
2017-12-18 15:28:14 +01:00
Leo Famulari
2ca712bdba
vm: Pass the host's /dev/urandom to the guest at /dev/hwrng.
* gnu/build/vm.scm (load-in-linux-vm): Use QEMU's virtio-rng-pci.
* gnu/system/vm.scm (common-qemu-options): Likewise.
2017-12-18 00:39:40 -05:00
Christopher Baines
e0d96774dd
gnu: system: vm: Use loose cache for 9p file system.
This improves the performance of the shared store for operations involving
lots of files, e.g. searching through the store.

* gnu/system/vm.scm (mapping->file-system): Add cache=loose to options.
2017-12-17 20:46:40 +00:00
Mathieu Othacehe
ceb3952764
system: Add BeagleBone Black installer.
* gnu/bootloader/u-boot.scm (u-boot-beaglebone-black-bootloader): New exported
  bootloader.
* gnu/system/install.scm (beaglebone-black-installation-os): New exported variable.
2017-12-15 12:15:15 +01:00
Mathieu Othacehe
e224820386
bootloader: Factorize write-file-on-device.
* gnu/bootloader/extlinux.scm (install-extlinux): Factorize bootloader
writing in a new procedure write-file-on-device defined in (gnu build
bootloader).
* gnu/build/bootloader.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.
* gnu/system/vm.scm (qemu-img): Adapt to import and use (gnu build bootloader)
module during derivation building.
* gnu/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-15 11:52:38 +01:00
Mathieu Othacehe
acf54bca22
vm: Adapt qemu command to ARM.
* gnu/build/vm.scm (load-in-linux-vm): New argument #:target-arm32.
Use it to adapt command for qemu-system-arm.  This implies to choose a
machine ("virt"), use the correct console port "ttyAMA0", disable KVM use
that is buggy on some ARM boards (Odroid XU4 for example) and use user mode
network stack instead of NIC. Gather all those options in a new variable
"arch-specific-flags".
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
to load-in-linux-vm "#:target-arm32?" argument.
2017-12-15 11:44:29 +01:00
Ludovic Courtès
2ba2c98d8a
gnu: guile: Move Readline support to a separate 'guile-readline' package.
This reduces the closure of Guile from 131 MiB to 116 MiB and removes
extra readline/ncurses builds from the bootstrap path.

* gnu/packages/guile.scm (guile-2.0)[inputs]: Remove READLINE.
(make-guile-readline): New procedure.
(guile-readline): New variable.
* gnu/system/shadow.scm (default-skeletons): Adjust '.guile' so that it
gracefully deals with missing (ice-9 readline).
2017-12-08 18:18:59 +01:00
Ludovic Courtès
5a2f019c7d
Merge branch 'version-0.14.0' 2017-12-07 17:16:05 +01:00
Tobias Geerinckx-Rice
fdfdecdb7e
gnu, doc, tests: Use ‘bootloader-configuration’ everywhere.
* doc/guix.texi (Proceeding with the Installation): Replace the old-style
‘grub-configuration’ with the newer ‘bootloader-configuration’ syntax.
* gnu/system/examples/vm-image.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda, %separate-home-os)
(%separate-store-os, %raid-root-os, %encrypted-root-os, %btrfs-root-os):
Likewise.
* gnu/tests/nfs.scm (%base-os): Likewise.
* tests/guix-system.scm (OS_BASE, make_user_config): Likewise.
* tests/system.scm (%os, %os-with-mapped-device): Likewise.
2017-12-06 15:02:24 +01:00
Ludovic Courtès
aab322d909
install: Don't start sshd by default.
Reported by Christopher Baines <mail@cbaines.net>
at <https://lists.gnu.org/archive/html/guix-devel/2017-12/msg00058.html>.

* gnu/services/ssh.scm (<openssh-configuration>)[%auto-start?]: New
field.
(openssh-shepherd-service): Honor it.
* gnu/system/install.scm (%installation-services): Set '%auto-start?' to
 #f for openssh-service-type.
2017-12-04 23:31:15 +01:00
Mathieu Othacehe
4307397b5e
bootloader: extlinux: Stop using dd binary.
* gnu/bootloader/extlinux.scm (dd): Remove it,
(install-extlinux): replace dd call by Guile I/O procedures.
* gnu/system/vm.scm (qemu-image): Add (ice-9 binary-ports) to used-modules
list to provide "get-bytevector-n" and "put-bytevector".
* guix/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-04 18:26:59 +01:00
Ludovic Courtès
8638362f13
install: Add colors in 'motd' and 'issue'.
* gnu/system/install.scm (%installation-services)[motd]: Add colors.
[services]: Use the "lat9u-16" font.
(%issue): Add colors.
2017-12-03 19:12:16 +01:00
Ludovic Courtès
af4a761e97
install: Add the prerequisites of 'profile-derivation' as GC roots.
* gnu/system/install.scm (%installation-services): Add
GLIBC-UTF8-LOCALES, TEXINFO, and GUILE-FINAL as GC roots.
2017-12-03 19:12:16 +01:00
Ludovic Courtès
bf57e1c708
uuid: Fix typo in comment.
* gnu/system/uuid.scm: Fix typo in comment.
2017-12-02 23:13:20 +01:00
Mathieu Othacehe
04bbd07218
system: vm: Fix typo in comment.
* gnu/system/vm.scm (qemu-image): Fix typo targetting -> targeting.
2017-12-02 13:58:05 +01:00
Mathieu Othacehe
00e39b2ea4
system: vm: Do not add EFI partition on ARM system.
* gnu/system/vm.scm (qemu-img): Do not add EFI partition if we are targetting
  ARM.

UEFI support on u-boot is still experimental, so do not add EFI partition on
ARM for now.
2017-12-01 13:55:49 +01:00
Ludovic Courtès
f00515b483
vm: Filter out file systems that refer to UUIDs or labels.
* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]:
Filter out things that refer to file system UUIDs or labels.
2017-11-30 18:14:57 +01:00
Mathieu Othacehe
b8e7781122
vm: Use os-defined initrd intead of base-initrd.
* gnu/system/vm.scm (system-disk-image, system-qemu-image,
  virtualized-operating-system): Replace base-initrd by
  (operating-system-initrd os).

The system produced were always using base-initrd even if the user had
defined a custom initrd based on raw-initrd in the os declaration.
2017-11-26 13:50:37 +01:00
Tobias Geerinckx-Rice
795ec760e4
install: Fix typo.
* gnu/system/install.scm (installation-os): Fix typo in comment.
2017-11-11 05:17:59 +01:00
Hartmut Goebel
d9565f7d87
install: Use overlayfs instead of unionfs.
I dediced to keep adding /tmp as tmpfs since I was not able to trigger bug
while still using unionfs, so I could not verify whether this mount is still
needed with overlayfs.  Mapping /tmp to tmpfs does not harm, so we are on the
save side.

* gnu/system/install.scm (make-cow-store): Mount /gnu/store without additional
  read-only bind-mount, since in overlayfs the "lower" level is always
  read-only. Add work-dir required by overlayfs. No need to sleep anymore
  since now using the mount syscall. [unionfs]: Remove now unused function.
  (%installation-services): Update comment.
  (installation-os)[file-systems]: Update comment.
2017-11-08 18:23:06 +01:00
Hartmut Goebel
c828969036
build: Use overlayfs instead of unionfs.
Overlayfs is part of the kernel, while unionfs needs FUSE.  This also reduces
the size of the initrd by ca. 4.3% (487K).

* gnu/build/linux-boot.scm (mount-root-file-system): Remove optional parameter
  "unionfs"; mount using overlayfs instead of unionfs; new directory layout
  requied by overlayfs; update documentation.
  [mark-as-not-killable]: Remove now unused function

* gnu/system/linux-initrd.scm (file-system-packages): Remove now unused
  packages "unionfs-fuse/static" and thus unused related 'if'.
  (linux-modules): Replace "fuse" by "overlay".
2017-11-08 18:23:05 +01:00
Mathieu Othacehe
b1a3079347
system: vm: Use 2^32 - 1 as hash size.
* gnu/system/vm.scm (operating-system-uuid): Use 2^32 - 1 instead of
  2^32 as hash size.

On some 32 bit system (ARM for example), 2^32 exceeds hash max
size (ULONG_MAX = 2^32 - 1).
2017-11-06 20:02:25 +01:00
Marius Bakke
2c16be569c
system: Return early in skeleton '.bashrc' when the shell is non-interactive.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Add return statement.
2017-11-01 20:29:32 +01:00
Marius Bakke
0ab59dd8b8
system: Test for interactive shell instead of cat in skeleton '.bashrc'.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Wrap $SSH_CLIENT test in
a conditional testing for interactive shell.
2017-11-01 20:29:32 +01:00
Ludovic Courtès
9b396c0cab
vm: Always use GRUB/i386.
Fixes <https://bugs.gnu.org/28768>.
Reported by Oleg Pykhalov <go.wigust@gmail.com>.

* gnu/system/vm.scm (virtualized-operating-system): Override the
'bootloader' field.
2017-10-19 23:21:49 +02:00
Ludovic Courtès
50fcf37c13
doc: Give an example with a FAT UUID.
* gnu/system/examples/lightweight-desktop.tmpl <file-systems>: Add a
UUID for the /boot/efi partition.
* doc/guix.texi (Using the Configuration System): Mention it.
2017-10-11 11:12:33 +02:00
Ludovic Courtès
03f66aea63
uuid: Change "fat32" to "fat".
* gnu/system/uuid.scm (%fat32-endianness): Rename to...
(%fat-endianness): ... this.
(fat32-uuid->string): Rename to...
(fat-uuid->string): ... this.
(%fat32-uuid-rx): Rename to..
(%fat-uuid-rx): ... this.
(string->fat32-uuid): Rename to...
(string->fat-uuid): ... this.
(%uuid-parsers, %uuid-printers): Add 'fat16.
2017-10-11 11:12:33 +02:00
Ludovic Courtès
9976c76aab
file-systems: Preserve UUID types when serializing.
Reported by Roel Janssen <roel@gnu.org>
at <https://lists.gnu.org/archive/html/help-guix/2017-09/msg00094.html>.

* gnu/system/file-systems.scm (file-system->spec): When DEVICE is a
UUID, serialize it in a way that preserves its type.
(spec->file-system): Adjust accordingly.
* gnu/build/file-systems.scm (canonicalize-device-spec): Add case for
when SPEC is 'uuid?'.
2017-10-11 11:12:33 +02:00
Ludovic Courtès
1c65cca574
file-systems: 'mount-file-system' now takes a <file-system> object.
* gnu/build/file-systems.scm (mount-file-system): Rename 'spec' to 'fs'
and assume it's a <file-system>.
* gnu/build/linux-boot.scm (boot-system): Assume MOUNTS is a list of
<file-system> and adjust accordingly.
* gnu/build/linux-container.scm (mount-file-systems): Remove
'file-system->spec' call.
* gnu/services/base.scm (file-system-shepherd-service): Add
'spec->file-system' call.  Add (gnu system file-systems) to 'modules'.
* gnu/system/linux-initrd.scm (raw-initrd): Use (gnu system
file-systems).  Add 'spec->file-system' call for #:mounts.
2017-10-11 11:12:33 +02:00
Christopher Baines
b36e06c2b0
linux-initrd: Ensure that the guile used in the initrd is referenced.
By referencing guile from the initrd output explicitly, it will be present in
the store when this initrd is used. If the exact guile used within the initrd
isn't present in the store, then after root is switched during the boot
process, loading modules (such as (ice-9 popen)) won't work.

This fixes guix-patches bug #28399, "Fix mysql activation, and add a basic
test".

* gnu/system/linux-initrd.scm (expression->initrd)[builder]: Write out a file
  called references in to the initrd output, which includes the store path for
  guile.
2017-10-08 17:31:49 +01:00
Ludovic Courtès
dd41a7f8d8
file-systems: Add a 'location' field to <file-system>.
* gnu/system/file-systems.scm (<file-system>)[location]: New field.
2017-10-05 12:09:17 +02:00
Ludovic Courtès
aed1f1b049
uuid: Add 'uuid=?' and use it.
* gnu/system/uuid.scm (uuid=?): New procedure.
* tests/uuid.scm ("uuid=?"): New test.
* gnu/build/file-systems.scm (partition-uuid-predicate)
(luks-partition-uuid-predicate): Use it instead of 'bytevector=?'.
2017-10-05 12:09:17 +02:00
Christopher Baines
eb152070f1
vm: Add disk-image-size to <virtual-machine>.
* gnu/system/vm.scm (<virtual-machine>): Add disk-image-size.
  (port-forwardings->qemu-options): Use disk-image-size from
  <virtual-machine>.
2017-10-04 07:16:43 +01:00
Christopher Baines
0c75a4de49
vm: Add a minimum root size.
* gnu/system/vm.scm (qemu-image): When guessing the root-size, use a lower
  bound of 20 MiB, otherwise the root file system size is sometimes 0 MiB in
  size.
2017-10-04 07:16:40 +01:00
Ludovic Courtès
8a7d81a5e2
uuid: Add a parser for FAT32 UUIDs.
* gnu/system/uuid.scm (%fat32-uuid-rx): New variable.
(string->fat32-uuid): New procedure.
(%uuid-parsers): Add it.
* tests/uuid.scm ("uuid, FAT32, format preserved"): New test.
2017-09-22 18:40:57 +02:00
Ludovic Courtès
fbc31dc124
services: Move 'session-environment-service-type' to pam.scm.
* gnu/services/base.scm (environment-variables->environment-file)
(session-environment-service-type)
(session-environment-service): Move to...
* gnu/system/pam.scm: ... here.
2017-09-22 00:05:08 +02:00
Ludovic Courtès
960c40de21
doc: Use Screen and OpenSSH in the bare-bones example.
* gnu/system/examples/bare-bones.tmpl (packages): Remove TCPDUMP; add
SCREEN and OPENSSH.
* doc/guix.texi (Using the Configuration System): Adjust explanation
accordingly.
2017-09-12 23:56:34 +02:00
Ludovic Courtès
4e854b1814
install: Include the whole bare-bones OS in the image.
* gnu/system/install.scm (%installation-services): Load
"example/bare-bones.tmpl".  Add a 'gc-root-service-type' instance.
2017-09-12 23:56:33 +02:00
Ludovic Courtès
5f7fe1c57e
vm: Generate a UUID to identify the root file system.
This makes collisions less likely than when using a label to look up the
partition.  See <https://bugs.gnu.org/27735>.

* gnu/system/vm.scm (operating-system-uuid): New procedure.
(system-disk-image): Define 'root-uuid' and use it for the root file
system.  Pass it to 'iso9660-image' and 'qemu-image'.
2017-09-11 22:26:29 +02:00
Ludovic Courtès
fd3b4b985d
vm: Allow users to specify a UUID for the root partition.
* gnu/system/vm.scm (qemu-image): Add #:file-system-uuid parameter; pass
it as the 'uuid' field of the root partition.
2017-09-11 22:26:24 +02:00
Ludovic Courtès
ce094b4663
uuid: 'uuid' macro supports more UUID types.
* gnu/system/uuid.scm (string->uuid): Turn 'type' into an optional
argument.
(uuid): Add clauses to allow for an optional 'type' parameter.
2017-09-11 22:24:47 +02:00
Ludovic Courtès
9b336338cd
system: Introduce a disjoint UUID type.
Conceptually a UUID is just a bytevector.  However, there's software out
there such as GRUB that relies on the string representation of different
UUID types (e.g., the string representation of DCE UUIDs differs from
that of ISO-9660 UUIDs, even if they are actually bytevectors of the
same length).  This new <uuid> record type allows us to preserve
information about the type of UUID so we can eventually convert it to a
string using the right representation.

* gnu/system/uuid.scm (<uuid>): New record type.
(bytevector->uuid): New procedure.
(uuid): Return calls to 'make-uuid'.
(uuid->string): Rewrite using 'match-lambda*' to accept a single 'uuid?'
argument.
* gnu/bootloader/grub.scm (grub-root-search): Check for 'uuid?' instead
of 'bytevector?'.
* gnu/system.scm (bootable-kernel-arguments): Check whether ROOT-DEVICE
is 'uuid?'.
(read-boot-parameters): Use 'bytevector->uuid' when the
store device is a bytevector.
(read-boot-parameters-file): Check for 'uuid?' instead of 'bytevector?'.
(device->sexp): New procedure.
(operating-system-boot-parameters-file): Use it for 'root-device' and
'store'.
(operating-system-bootcfg): Remove conditional in definition of
'root-device'.
* gnu/system/file-systems.scm (file-system->spec): Check for 'uuid?' on
DEVICE and take its bytevector.
* gnu/system/mapped-devices.scm (open-luks-device): Likewise.
* gnu/system/vm.scm (iso9660-image): Call 'uuid-bytevector' for the
 #:volume-uuid argument.
2017-09-11 22:24:46 +02:00
Ludovic Courtès
47cef4ecad
file-systems: Introduce (gnu system uuid).
* gnu/build/file-systems.scm (sub-bytevector)
(latin1->string, %fat32-endianness, fat32-uuid->string)
(%iso9660-uuid-rx, string->iso9660-uuid)
(iso9660-uuid->string, %network-byte-order)
(dce-uuid->string, %uuid-rx, string->dce-uuid)
(string->ext2-uuid, string->ext3-uuid, string->ext4-uuid)
(vhashq, %uuid-parsers, %uuid-printers, string->uuid)
(uuid->string): Move to...
* gnu/system/uuid.scm: ... here.  New file.
* gnu/system/file-systems.scm (uuid): Move to the above file.
* gnu/system/vm.scm: Adjust accordingly.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add uuid.scm.
2017-09-11 22:24:46 +02:00
Ludovic Courtès
1e8d398abc
install: Add OpenSSH to the global profile.
Suggested by Jan Nieuwenhuizen.

* gnu/system/install.scm (installation-os)[packages]: Add OPENSSH.
2017-09-10 23:34:29 +02:00
Ludovic Courtès
903ae630a0
install: Add 'passwd' to $PATH.
Suggested by Jan Nieuwenhuizen.

* gnu/system/install.scm (installation-os)[setuid-programs]: Add 'passwd'.
2017-09-10 23:34:29 +02:00
Christopher Baines
b069111f7a
vm: Call iso9660-image with #:register-closures? as #t.
* gnu/system/vm.scm (system-disk-image): Call iso9660-image with
  #:register-closures? as #t.
2017-09-06 08:43:52 +01:00
Christopher Baines
e375d3fab7
vm: Add support for registering closures to iso9660-image.
* gnu/system/vm.scm (iso9660-image): Add support for registering closures.
2017-09-06 08:43:48 +01:00
Christopher Baines
4138e782dc
vm: Remove redundant conditional in system-disk-image.
* gnu/system/vm.scm (system-disk-image): Remove redundant conditional for
  #:file-system-type when calling qemu-image.
2017-09-04 22:30:04 +01:00
Andy Wingo
045ebb3e58
gnu: bootloader: Deprecate "device" field in favor of "target".
* gnu/bootloader.scm (<bootloader-configuration>): Deprecate "device" field in
favor of "target" field.  This is mostly a renaming but also a generalization
to support UEFI targets being paths to a mounted partition instead of a device
name.
* gnu/system/examples/bare-bones.tmpl:
* gnu/system/examples/desktop.tmpl:
* gnu/system/examples/lightweight-desktop.tmpl:
* gnu/system/examples/vm-image.tmpl:
* gnu/system/install.scm:
* gnu/tests.scm:
* gnu/tests/install.scm:
* gnu/tests/nfs.scm:
* tests/system.scm: Adapt all invocations of bootloader-configuration.
* guix/scripts/system.scm (perform-action): Rename device argument to
bootloader-target.
(process-action): Adapt caller.
* doc/guix.texi (Proceeding with the Installation):
* doc/guix.texi (Bootloader Configuration): Update documentation.
2017-08-23 22:23:19 +02:00
Andy Wingo
2941b347b6
gnu: grub-efi-bootloader: Specialize grub-install invocation.
* gnu/bootloader/grub.scm (install-grub-efi): Fix grub-install invocation for
  EFI systems.
* gnu/system/examples/bare-bones.tmpl: Use the newer
"bootloader-configuration" syntax.
* gnu/system/examples/desktop.tmpl: Use bootloader-configuration sytax.  Also,
use the same label for the LUKS-mapped device and the root partition.  Remove
unneeded "title" field for the file-system based on LUKS; as noted in the
manual, the "title" field is ignored for mapped devices.
* gnu/system/examples/lightweight-desktop.tmpl: Use bootloader-configuration,
and use grub-efi-bootloader.
2017-08-20 11:16:42 +02:00
Danny Milosavljevic
cf189709bc
vm: Use grub-hybrid's grub-mkrescue.
* gnu/system/vm.scm (system-disk-image): Use grub-hybrid's grub-mkrescue.
* gnu/bootlader/grub.scm (grub-mkrescue-bootloader): New variable.
2017-08-03 18:13:03 +02:00
Ludovic Courtès
138fe41198
system: Add 'grep --color' alias in '.bash_profile' skeleton.
* gnu/system/shadow.scm (default-skeletons)[profile]: Add 'grep' alias.
2017-07-27 14:44:28 +02:00
Ludovic Courtès
a84ea2191e
system: Add a default '.guile' skeleton.
* gnu/system/shadow.scm (default-skeletons): Add ".guile".
2017-07-25 12:23:26 +02:00
Ludovic Courtès
ed419fa0c5
vm: Add a <virtual-machine> type and associated gexp compiler.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add
 #:options parameter and honor it.
(<virtual-machine>): New record type.
(virtual-machine): New macro.
(port-forwardings->qemu-options, virtual-machine-compiler): New
procedures.
2017-07-20 11:57:13 +02:00
Ludovic Courtès
8d033e3e16
vm: 'iso9660-image' produces a single-file output.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
  #:single-file-output? and pass it to 'load-in-linux-vm'.
(iso9660-image): Pass #:single-file-output? to
'expression->derivation-in-linux-vm'.
* gnu/build/vm.scm (load-in-linux-vm): Add #:single-file-output? and
honor it.
2017-07-18 21:41:35 +02:00
Ludovic Courtès
b19a49d015
locale: Demonadify the locale creation API.
* gnu/system/locale.scm (single-locale-directory): Use 'computed-file'
instead of 'gexp->derivation'.
(locale-directory): Adjust accordingly and do the same.
* gnu/system.scm (operating-system-directory-base-entries): Adjust
accordingly.
2017-07-17 23:41:36 +02:00
Ludovic Courtès
6d833b13b7
gnu: Remove glibc@2.21 and its traces.
* gnu/packages/base.scm (glibc-2.21): Remove.
* gnu/system/locale.scm (localedef-command)[maybe-version-directory]:
Remove.  Replace call with use of 'package-version'.
(single-locale-directory): Remove 'version>=' conditional.
2017-07-17 23:41:36 +02:00
Tobias Geerinckx-Rice
0862b95433
build, vm: Use a less common label.
* gnu/build/vm.scm (initialize-hard-disk): Use "GuixSD_image" as label.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/system/vm.scm (system-disk-image): Likewise.
2017-07-17 20:20:24 +02:00
宋文武
59132b8000
gnu: Rename (gnu packages qemu) to (gnu packages virtualization).
* gnu/packages/qemu.scm: Rename this ...
* gnu/packages/virtualization.scm: ... to this.
* gnu/local.mk (GNU_SYSTEM_MODULES),
gnu/packages/bootloaders.scm, gnu/packages/debug.scm,
gnu/packages/gnome.scm, gnu/system/vm.scm,
gnu/tests/install.scm: Adjust accordingly.
2017-07-15 19:17:37 +08:00
Ludovic Courtès
4ddb64f57d
system: Refer to native packages when appropriate.
* gnu/system/locale.scm (localedef-command): Use the native LIBC.
* gnu/system/shadow.scm (default-skeletons): Use the native GUILE-WM.
2017-07-11 22:47:08 +02:00
Danny Milosavljevic
651de2bdb5
build, vm: Use "GuixSD" or "GUIXSD" as volume label.
* gnu/build/vm.scm (initialize-hard-disk): Use "GuixSD" as label.
* gnu/system/install.scm (installation-os): Use "GuixSD" as label.
* gnu/system/vm.scm (system-disk-image): Use "GuixSD" or "GUIXSD" as volume
label.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-07-10 15:35:43 +02:00
Danny Milosavljevic
acc0f6bb58
guix system: Add file system label and uuid to iso9660-image.
* gnu/system/vm.scm (system-disk-image): Pass root-label to ...
(iso9660-image): ... here.  Add keyword arguments #:file-system-label
and #:file-system-uuid.
2017-07-07 18:04:31 +02:00
Ludovic Courtès
6d9a859038
linux-initrd: Avoid monadic style a bit.
* gnu/system/linux-initrd.scm (expression->initrd): Use 'program-file'
for 'init'.
(flat-linux-module-directory): Use 'computed-file' instead of
'gexp->derivation'.
(raw-initrd): Adjust accordingly.
2017-07-04 23:45:12 +02:00
Marius Bakke
6db571cbf0
install: Drop redundant package after c0f5eee4b2.
* gnu/system/install.scm (installation-os): Remove SHADOW.
2017-07-04 02:52:25 +02:00
Danny Milosavljevic
be1033a334
build: Add iso9660 system image generator.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Add 'iso9660-image .
* gnu/build/vm.scm (make-iso9660-image): New variable.  Export it.
* gnu/system/vm.scm (iso9660-image): New variable.  Use make-iso9660-image.
(system-disk-image): Use iso9660-image.
2017-07-03 10:07:59 +02:00
Danny Milosavljevic
ed3485fa9c
linux-initrd: Add isofs if necessary.
* gnu/system/linux-initrd.scm (base-initrd): Add isofs.
2017-07-02 20:27:26 +02:00
Ludovic Courtès
50cb948f1c
install: Re-add /bin/sh.
Reported by Divan Santana <divan@santanas.co.za>.
/bin/sh had disappeared in commit
387e175492.

* gnu/system/install.scm (%installation-services): Add
'special-files-service-type' instance.
2017-07-02 16:44:59 +02:00
Ludovic Courtès
a8ac4f081a
vm: Estimate the disk size by default.
* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.
2017-06-30 00:16:50 +02:00
Jan Nieuwenhuizen
ebfb71d456
tests: Allow setting of qemu memory-size for system tests.
* gnu/system/vm.scm (common-qemu-options): Remove hardcoded "-m 256".
(system-qemu-image/shared-store-script): New keyword argument: #:memory-size.
2017-06-16 13:22:49 +02:00
Mark H Weaver
f45878a80d
mapped-devices: Cope with delayed appearance of LUKS source.
Fixes <https://bugs.gnu.org/27242>.

* gnu/system/mapped-devices.scm (open-luks-device): If
'find-partition-by-luks-uuid' fails, try again once per second, up to ten
times.
2017-06-07 19:03:03 -04:00
Marius Bakke
0dc4a498a3
install: Add 'passwd' to installation image.
* gnu/system/install.scm (installation-os): Add SHADOW in package list.
2017-05-23 01:22:22 +02:00
Marius Bakke
9a1bfe7648
vm: Increase default disk size to account for ESP partition.
Fixes a test regression introduced by ecf5d53769.

* gnu/system/vm.scm (system-qemu-image/shared-store-script): 30MiB -> 70MiB.
2017-05-21 01:07:12 +02:00
Marius Bakke
8ea98ee10c
doc: Update for UEFI systems.
* doc/guix.texi (USB Stick Installation): Mention UEFI.
(Preparing for Installation): Add notes about EFI System Partition, and
mounting partitions before init.
(Proceeding with the Installation): Mention the GRUB-EFI package.
(Using the Configuration System): Lightweight desktop is now a UEFI system.
(GRUB Configuration): Expand on package field. Add indexes.
* gnu/system/examples/lightweight-desktop.tmpl: Adjust to native EFI configuration.
2017-05-19 13:52:49 +02:00
Marius Bakke
ecf5d53769
vm: Add UEFI loader to disk images.
* gnu/build/vm.scm (install-efi): New procedure.
(initialize-hard-disk): Generate EFI blob when ESP is present.
* gnu/system/vm.scm (qemu-image): Append 40MiB EFI System Partition.
2017-05-19 12:59:25 +02:00
Marius Bakke
4d415f0c3c
vm: Support creating FAT partitions.
* gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): New procedures.
(format-partition): Use them. Error for unknown file systems.
* gnu/system/vm.scm (qemu-image): Include DOSFSTOOLS.
* gnu/system/linux-initrd.scm (base-initrd): Always add nls_is8859-1.ko.
2017-05-19 12:59:25 +02:00
Marius Bakke
01cc84dade
vm: Support arbitrary partition flags.
* gnu/build/vm.scm (<partition>): Change BOOTABLE? to FLAGS.
(initialize-partition-table): Pass each flag to parted.
(initialize-hard-disk): Locate boot partition.
* gnu/system/vm.scm (qemu-image): Adjust partition flags.
2017-05-19 12:59:25 +02:00
Marius Bakke
c80cd4dfb4
install: Enable SSH in installation image.
* gnu/system/install.scm (%installation-services): Add OPENSSH-SERVICE-TYPE.
* doc/guix.texi (Preparing for Installation)[Networking]: Document it.
2017-05-18 01:00:53 +02:00
Leo Famulari
4b236c88ea
maint: The 'release' target builds a VM image.
* gnu/system/examples/vm-image.tmpl: New file.
* Makefile.am (GUIXSD_VM_SYSTEMS, GUIXSD_VM_IMAGE_BASE,
GUIXSD_VM_IMAGE_SIZE): New variables.
(release): Add logic to build a VM image.
(EXAMPLES): Add 'gnu/system/examples/vm-image.tmpl'.
* doc/guix.texi (Running GuixSD in a VM, Installing GuixSD in a VM): Mention the
pre-built VM image.
2017-05-17 14:12:51 -04:00
Mathieu Othacehe
9121ce553d
bootloader: Adapt vm to new bootloader API.
* gnu/build/install.scm (install-boot-config): New procedure.
  (install-grub): Move to (gnu bootloader grub).
* gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and
  adjust accordingly.
  (initialize-hard-disk): Takes a bootloader-package, bootcfg, bootcfg-location and
  bootloader-installer procedure. Adjust accordingly.
* gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk.
  (system-disk-image, system-qemu-image, system-qemu-image/shared-store):
  Adjust to qemu-image.
2017-05-16 14:41:01 +02:00
Mathieu Othacehe
b09a8da4a2
bootloader: Add extlinux support.
* gnu/bootloader.scm: New file.
* gnu/bootloader/extlinux.scm: New file.
* gnu/bootloader/grub.scm: New file.
* gnu/local.mk: Build new files.
* gnu/system.scm: Adapt to new bootloader api.
* gnu/scripts/system.scm: Adapt to new bootloader api.
* gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu
bootloader grub) modules.
* gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm.
* gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader).
* gnu/tests.scm: Ditto.
* gnu/tests/nfs.scm: Ditto.
2017-05-16 14:41:01 +02:00
Leo Famulari
c48a145fbb
system: grub: Actually default to 'gfxterm' for displaying the GRUB menu.
This is a followup to commit e0b2e93005.

* gnu/system/grub.scm (eye-candy): Re-order the elements of the generated
GRUB configuration.
2017-05-15 16:22:17 -04:00
Leo Famulari
e0b2e93005
system: grub: Expose GRUB's interactive interface settings.
* gnu/system/grub.scm (<grub-configuration>): Add new fields
terminal-outputs, terminal-inputs, serial-unit, and serial-speed.
(grub-setup-io, setup-gfxterm): New procedures.
* doc/guix.texi (GRUB Configuration): Document the new fields.
2017-05-14 14:12:26 -04:00
Ludovic Courtès
76f429ad9b
system: grub: Use the native Guile-Cairo and Guile-SVG.
* gnu/system/grub.scm (svg->png): Use 'ungexp-native' aka. #+ when
referring to GUILE-CAIRO, GUILE-SVG, and SVG.
2017-05-09 00:18:05 +02:00
Ricardo Wurmus
e586257b55
system: Allow root to run "su" without password.
* gnu/system/pam.scm (unix-pam-service): Add pam-entry for "pam_rootok.so" to
auth field when ALLOW-ROOT? is #T.
(base-pam-services): Allow root to run "su" without authentication.
2017-05-08 23:11:01 +02:00
Danny Milosavljevic
bf8b09169c
system: grub: Use boot-parameters instead of menu-entry where possible.
* gnu/system/grub.scm (boot-parameters->menu-entry): New variable.
(grub-configuration-file): Use boot-parameters
instead of menu-entry where possible.
* guix/scripts/system.scm (profile-boot-parameters): Update docstring.
(reinstall-grub): Use profile-boot-parameters.
(perform-action): Use profile-boot-parameters.
2017-05-05 15:03:48 +02:00
Danny Milosavljevic
83071b052a
system: vm: Use operating-system-kernel-arguments.
* gnu/system/vm.scm (system-qemu-image/shared-store-script):
Use operating-system-kernel-arguments.
2017-05-05 15:03:47 +02:00
Ludovic Courtès
69daee23af
ui: Rename '_' to 'G_'.
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-05-03 16:16:17 +02:00
Danny Milosavljevic
af98d25a12
system: Rename operating-system-kernel-arguments to operating-system-user-kernel-arguments.
* gnu/system.scm (operating-system-kernel-arguments): Rename to ...
(operating-system-user-kernel-arguments): ... this.
(<operating-system>): Adapt accordingly.
(operating-system-bootcfg): Adapt accordingly.
(operating-system-parameters-file): Adapt accordingly.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Adapt
accordingly.
2017-04-22 20:54:31 +02:00
Danny Milosavljevic
958a1fda9e
system: Make grub use <menu-entry> instead of <boot-parameters> again.
* gnu/system/grub.scm: Remove boot-parameters->menu-entry.
(grub-configuration): Don't use boot-parameters->menu-entry.
* gnu/system.scm (operating-system-bootcfg): Use menu-entry.
* guix/scripts/system.scm (reinstall-grub): Use profile-grub-entries.
(perform-action): Use profile-grub-entries.
2017-04-15 22:02:38 +02:00
Mathieu Othacehe
2e58e05bb6
system: Pass boot-parameters to (gnu system grub).
* gnu/system.scm (operating-system-bootcfg): Pass boot-parameters.
* gnu/system/grub.scm (boot-parameters->menu-entry): New variable.
(grub-configuration-file): Use boot-parameters->menu-entry.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15 16:37:55 +02:00
Danny Milosavljevic
0ab1e8ae88
system: grub: Use (first all-entries) instead of (first entries).
* gnu/system/grub.scm (grub-configuration-file): Use (first all-entries)
instead of (first entries).
2017-04-15 15:49:47 +02:00
Mathieu Othacehe
07f812c404
vm: Reword grub.cfg to bootcfg.
* gnu/build/vm.scm (register-grub.cfg-root): Reword grub.cfg to bootcfg,
(initialize-hard-disk): ditto,
* gnu/system/vm.scm (system-disk-image): ditto,
(system-qemu-image): ditto,
(system-qemu-image/shared-store): ditto.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15 14:42:15 +02:00
Mathieu Othacehe
c76b3046f6
system: Rename operating-system-grub.cfg to operating-system-bootcfg.
* gnu/system.scm (operating-system-grub.cfg): Rename to...
(operating-system-bootcfg): ... this.
* gnu/system/vm.scm (system-disk-image): Use operating-system-bootcfg.
(system-qemu-image): Use operating-system-bootcfg.
(system-qemu-image/shared-store): Use operating-system-bootcfg.
* guix/scripts/system.scm (perform-action): Use operating-system-bootcfg.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15 14:41:10 +02:00
Leo Famulari
eea2f45369
doc: Use OpenSSH instead of lsh in bare-bones template.
* gnu/system/examples/bare-bones.tmpl (services): Use openssh-service-type
instead of lsh-service.
2017-04-12 11:42:52 -04:00
Ludovic Courtès
5f19fb6a26
system: grub: Don't attempt to load non-EFI modules on EFI.
This resulted in a couple of harmless warnings just before the menu is
displayed.

* gnu/system/grub.scm (eye-candy)[setup-gfxterm-body]: Move 'vbe' and
'vga' loading to the non-EFI branch.
2017-03-25 22:50:24 +01:00
Ludovic Courtès
7dbd75b3cf
file-systems: Add missing docstring.
* gnu/system/file-systems.scm (file-system-type-predicate): Add
docstring.
2017-03-21 22:33:07 +01:00
Ludovic Courtès
278d486b0c
file-systems: Do not use (gnu packages …).
Fixes a regression introduced in
7208995426 whereby (gnu system
file-systems) would pull in (gnu packages …) module, which in turn
breaks when importing things like (gnu build shepherd).

* gnu/system/file-systems.scm (file-system-type-predicate): Export.
(file-system-packages): Move to...
* gnu/system/linux-initrd.scm (file-system-packages): ... here.  Add
docstring.
* gnu/services/base.scm: Use it.
* tests/file-systems.scm ("does not pull (gnu packages …)"): New test.
2017-03-21 22:33:07 +01:00
Danny Milosavljevic
7208995426
file-systems: Factorize file-system-packages.
* gnu/system/linux-initrd.scm (base-initrd): Move helper-packages body to ...
* gnu/system/file-systems.scm (file-system-packages): ... here.  New variable.
Also export it.
2017-03-18 10:38:51 +01:00
Ludovic Courtès
239c22663a
Add 'guix pack'.
* gnu/system/install.scm (self-contained-tarball): Move to...
* guix/scripts/pack.scm: ... here.  New file.
* doc/guix.texi (Binary Installation): Mention 'guix pack'.
(Invoking guix pack): New node.
* build-aux/make-binary-tarball.scm: Remove.
* Makefile.am (MODULES): Add guix/scripts/pack.scm.
(EXTRA_DIST): Remove build-aux/make-binary-tarball.scm.
(guix-binary.%.tar.xz): Rewrite using 'guix pack'.
* build-aux/hydra/gnu-system.scm (tarball-jobs): Adjust accordingly.
2017-03-12 17:47:25 +01:00
Mathieu Othacehe
47bdc5a173
linux-initrd: Add a raw-initrd and use it to define base-initrd.
* gnu/system/linux-initrd.scm (raw-initrd): New exported variable.
(base-initrd): Use raw-initrd to build the initrd.
* doc/guix.texi (Initial RAM Disk): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-11 12:43:36 +01:00
David Craven
909de139e7
vm: Fix full-boot? option.
* gnu/system/vm.scm (virtualized-operating-system): Add full-boot?
  option. Don't add a %store-mapping when full-boot? is passed. This leads
  the grub-configuration-file procedure to look for the kernel and initrd in
  / instead of /gnu/store.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-06 23:54:48 +01:00
Ludovic Courtès
ecc4324fef
system: grub: Add missing URL in comment.
* gnu/system/grub.scm (grub-root-search): Add missing URL in comment.
2017-03-06 23:54:48 +01:00
David Craven
26a076ed69
vm: Improve readability of run-vm.sh generation.
* gnu/system/vm.scm (common-qemu-options,
system-qemu-image/shared-store-script): Improve readability.
2017-03-01 00:15:31 +01:00
David Craven
43fe431cce
vm: Remove hard coded kernel file name.
* gnu/system/vm.scm (system-qemu-image/shared-store-script,
expression->derivation-in-linux-vm): Use operating-system-kernel-file and
system-linux-image-file-name.
* gnu/system.scm (system-linux-image-file-name): Add ARM.
2017-02-28 23:43:35 +01:00
Leo Famulari
0d7feebb62
gnu: lightweight-desktop.tmpl: Remove xmonad.
* gnu/system/examples/lightweight-desktop.tmpl (packages): Remove xmonad.
2017-02-23 17:44:59 -05:00
Leo Famulari
533372319e
gnu: lightweight-desktop.tmpl: Complete i3-wm.
* gnu/system/examples/lightweight-desktop.tmpl (packages): Add i3status
and dmenu.
(use-package-modules): Add suckless.
2017-02-23 17:44:54 -05:00
Ludovic Courtès
d2986552d1
system: Use the normalized codeset for the locale name in the examples.
* gnu/system/examples/bare-bones.tmpl <locale>: Change to "en_US.utf8".
* gnu/system/examples/desktop.tmpl <locale>: Likewise.
* gnu/system/examples/lightweight-desktop.tmpl <locale>: Likewise.
2017-02-13 10:02:54 +01:00
David Craven
862e38d551
gnu: Move (gnu packages grub) and (gnu packages u-boot) ...
to (gnu packages bootloaders).

* gnu/packages/grub.scm: Rename to bootloaders.scm.
* gnu/packages/u-boot.scm: Move to bootloaders.scm.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add bootloaders.scm,
  remove grub.scm and u-boot.scm;
* gnu/system/grub.scm: Import (gnu packages bootloaders).
* gnu/system/install.scm: Import (gnu packages bootloaders).
* gnu/system/vm.scm: Import (gnu packages bootloaders).
2017-02-10 17:15:35 +01:00
David Craven
72524ae843
system: install: Add gptfdisk to installation os.
* gnu/system/install.scm (installation-os)[packages]: Add gptfdisk.
2017-02-10 13:39:02 +01:00
Ludovic Courtès
7597478e2e
file-systems: Add '%network-configuration-files' and '%network-file-mappings'.
* gnu/system/file-systems.scm (%network-configuration-files)
(%network-file-mappings): New variables.
* guix/scripts/environment.scm (%network-configuration-files): Remove.
(launch-environment/container): Refer to '%network-file-mappings'
instead of calling 'filter-map'.
2017-02-07 00:08:10 +01:00
Ludovic Courtès
ad167d028e
file-systems: Remove dependency on (guix store).
(gnu system file-systems) is used on the "build" side since commit
5970e8e248.

* gnu/system/file-systems.scm: Remove dependency on (guix store).
(%store-prefix): New procedure.
* tests/file-systems.scm ("does not pull (guix config)"): New test.
2017-02-04 02:13:43 +01:00
Ludovic Courtès
d2a5e6982d
file-systems: Add 'file-system-mapping->bind-mount'.
* gnu/system/file-systems.scm (file-system-mapping->bind-mount): New
procedure.
* gnu/system/linux-container.scm (mapping->file-system): Remove.
(containerized-operating-system)[mapping->fs]: Use
'file-system-mapping->bind-mount' instead of 'mapping->file-system'.
* guix/scripts/environment.scm (launch-environment/container): Likewise.
2017-02-03 00:23:28 +01:00
Ludovic Courtès
357db1f91d
system: More 'file-append' instead of #~(string-append #$thing …).
* gnu/system/shadow.scm (<user-account>)[shell]: Use 'file-append'.
(%base-user-accounts): Likewise.
* gnu/system/grub.scm (%background-image): Likewise.
2017-02-01 12:36:41 +01:00
Ludovic Courtès
ae763b5b0b
system: Create home directories once 'file-systems' is up.
Fixes <http://bugs.gnu.org/21108>.
Reported by Andy Patterson <ajpatter@uwaterloo.ca>
and Leo Famulari <leo@famulari.name>.

* gnu/build/activation.scm (activate-users+groups)[activate-user]: Pass
  #:create-home? #t iff CREATE-HOME? and SYSTEM?.
(activate-user-home): New procedure.
* gnu/system/shadow.scm (account-shepherd-service): New procedure.
(account-service-type)[extensions]: Add SHEPHERD-ROOT-SERVICE-TYPE
extension.
* gnu/tests/base.scm (run-basic-test)["home"]
["skeletons in home directories"]: New tests.
* gnu/tests/install.scm (%separate-home-os, %separate-home-os-source)
(%test-separate-home-os): New variables.
2017-02-01 12:36:41 +01:00