summaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
Commit message (Collapse)AuthorAge
* ui: Add 'report-load-error'.Ludovic Courtès2015-04-07
| | | | | | * guix/scripts/system.scm (read-operating-system): Replace error handling code by a call to 'report-load-error'. * guix/ui.scm (report-load-error): New procedure.
* ui: Factorize command-line + env. var. option parsing.Ludovic Courtès2015-02-26
| | | | | | | | | | | | | | * guix/ui.scm (%default-argument-handler, parse-command-line): New procedures. (environment-build-options): Make private. * guix/scripts/archive.scm (guix-archive)[parse-options, parse-options-from]: Remove. Use 'parse-command-line' instead. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * tests/ui.scm (with-environment-variable): New macro. ("parse-command-line"): New test.
* guix system: Honor '--no-grub'.Ludovic Courtès2015-02-24
| | | | | | | | Reported by Alex Kost <alezost@gmail.com> at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00564.html>. * guix/scripts/system.scm (%options) <no-grub>: Use 'alist-cons' instead of 'alist-delete'.
* guix system: Improve error messages.Ludovic Courtès2015-01-22
| | | | | | * guix/ui.scm (report-error): Export. * guix/scripts/system.scm (read-operating-system): Report syntax errors using standard GNU format. Report other errors using 'display-error'.
* monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès2015-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
* system: Don't make /boot/grub/grub.cfg a symlink to the store.Ludovic Courtès2014-12-09
| | | | | | | | | | | | | | | This would not work when /boot is a separate partition, as reported by Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>. This fixes a regression introduced in 39d1f82. * gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of symlinking it, as was the case before 39d1f82. * gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter. Make it a permanent GC root instead of an indirect GC root. (initialize-hard-disk): Adjust accordingly. * guix/scripts/system.scm (install-grub*): Replace use of 'add-indirect-root' by the addition of a permanent GC root in %GC-ROOTS-DIRECTORY.
* guix system: Fix typo affecting 'guix system init'.Ludovic Courtès2014-12-07
| | | | | | | | | Fixes <http://bugs.gnu.org/19279>. Fixes a regression introduced in cc7fa59. Reported by Tomas Cech <tcech@suse.cz>. * guix/scripts/system.scm (install): Fix order of arguments to 'lift' and 'lift2'.
* guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.nebuli2014-12-06
| | | | | | | | | | | | | | | | | | | | Appending to "raw" args broke optional parameters in 'guix package -I' and 'guix package -A', and possibly other places. Therefore, switch to parsing each set of options on its own and append resulting alists together afterwards. * guix/scripts/archive.scm (parse-options-from): Rename from (parse-options) and add explicit argument. New form of (parse-options) using its old algorithm via -from function. * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix build): Make it clear that the options are parsed independently. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* system: Make /boot/grub/grub.cfg an indirect GC root.Ludovic Courtès2014-12-04
| | | | | | | | | | Fixes <http://bugs.gnu.org/19160>. * guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an indirect GC root. * gnu/build/install.scm (install-grub): Make TARGET a symlink. * gnu/build/vm.scm (register-grub.cfg-root): New procedure. (initialize-hard-disk): Use it.
* guix system: Factorize 'grub-install' error handling, and use more 'mbegin'.Ludovic Courtès2014-12-04
| | | | | | * guix/scripts/system.scm (install-grub*): New procedure. (install): Use it, and use 'mwhen?'. (perform-action) <reconfigure>: Likewise.
* guix system: Use 'mbegin' for 'install'.Ludovic Courtès2014-12-02
| | | | | * guix/scripts/system.scm (install): Use 'mbegin'. Lift FORMAT and POPULATE-ROOT-FILE-SYSTEM, and use the result.
* guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.nebuli2014-11-30
| | | | | | | | | | | | | | | * doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'. * guix/scripts/archive.scm: (append args (environment-build-options)). * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * guix/ui.scm (environment-build-options): New function. * guix/utils.scm (arguments-from-environment-variable): New function. * tests/guix-build.sh: Add tests. * test-env.in: Unset GUIX_BUILD_OPTIONS. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix system: Add '--share' and '--expose' options for 'vm'.Ludovic Courtès2014-11-21
| | | | | | | | | | | * guix/scripts/system.scm (system-derivation-for-action): Add #:mappings parameter. Pass it to 'system-qemu-image/shared-store-script'. (perform-action): Likewise. (show-help): Document --share and --expose. (specification->file-system-mapping): New procedure. (%options): Add --share and --expose. (guix-system): Pass #:mapping to 'perform-action'. * doc/guix.texi (Invoking guix system): Document it.
* guix system: Decorate GRUB entries of old generations with date and number.Ludovic Courtès2014-11-11
| | | | | | * guix/scripts/system.scm (seconds->string): New procedure. (previous-grub-entries)[system->grub-entry]: Add 'number' and 'time' parameters. Adjust call accordingly.
* vm: Fix 'vm --full-boot' to produce a sufficient disk image.Ludovic Courtès2014-11-08
| | | | | | | | | | * gnu/system/vm.scm (system-qemu-image/shared-store): Add #:disk-image-size and #:full-boot? parameters and honor them. Pass '#:copy-inputs? full-boot?', and change #:inputs argument. * guix/scripts/system.scm (system-derivation-for-action): Pass #:disk-image-size to 'system-qemu-image/shared-store'. * doc/guix.texi (Invoking guix system): Mention use of '--image-size' in conjunction with '--full-boot'.
* vm: Support 'guix system vm --full-boot'.Ludovic Courtès2014-11-08
| | | | | | | | | | | * gnu/system/vm.scm (system-qemu-image/shared-store-script): Add #:full-boot? parameter and honor it. * guix/scripts/system.scm (system-derivation-for-action): Likewise. (perform-action): Likewise. (show-help): Document '--full-boot'. (%options): Add '--full-boot'. (guix-system): Add #:full-boot? argument in call to 'perform-action'. * doc/guix.texi (Invoking guix system): Document it.
* activation: Honor $GUIX_NEW_SYSTEM for use by 'guix system reconfigure'.Ludovic Courtès2014-09-12
| | | | | | | * gnu/build/activation.scm (activate-current-system): Honor $GUIX_NEW_SYSTEM by default. * guix/scripts/system.scm (switch-to-system): Set $GUIX_NEW_SYSTEM before loading SCRIPT.
* Move operating system helpers from (guix build …) to (gnu build …).Ludovic Courtès2014-09-03
| | | | | | | | | | | | * guix/build/activation.scm, guix/build/install.scm, guix/build/linux-initrd.scm, guix/build/vm.scm: Move to... * gnu/build: ... here. * Makefile.am (MODULES): Remove the above guix/build/ files. * gnu-system.am (GNU_SYSTEM_MODULES): Add the above gnu/build/ files here. * gnu/services/base.scm, gnu/services/dmd.scm, gnu/system.scm, gnu/system/linux-initrd.scm, gnu/system/vm.scm, guix/scripts/system.scm: Adjust to the new module names.
* guix system: Protect against changes to $PATH when activating the system.Ludovic Courtès2014-07-23
| | | | | | | | Partly fixes <http://bugs.gnu.org/18082>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (save-environment-excursion): New macro. (switch-to-system): Wrap 'primitive-load' call in it.
* guix system: Fix type error in 'reconfigure'.Ludovic Courtès2014-07-23
| | | | | | | | Partly fixes <http://bugs.gnu.org/18082>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (perform-action) <reconfigure>: Pass the output file name of GRUB.CFG to 'install-grub'.
* guix system: Factorize 'copy-closure'.Ludovic Courtès2014-07-20
| | | | | | | * guix/scripts/system.scm (copy-closure): Rename to... (copy-item): ... this. (copy-closure): New procedure. (install): Use it, and remove redundant code.
* guix system: init: Always use /var/guix as the target state directory.Ludovic Courtès2014-07-18
| | | | | | | | Fixes <http://bugs.gnu.org/18049>. Reported by Marek Benc <merkur32@gmail.com>. * guix/scripts/system.scm (copy-closure): Pass #:state-directory to 'register-path'.
* guix system: reconfigure: Always use "/" as GRUB's target file system.Ludovic Courtès2014-07-14
| | | | | | * guix/scripts/system.scm (perform-action) <reconfigure>: Wrap 'install-grub' call in 'false-if-exception'. Always use "/" as the target.
* guix system: Fix return value for 'reconfigure'.Ludovic Courtès2014-07-13
| | | | | * guix/scripts/system.scm (perform-action) <reconfigure>: Add missing 'return' expression.
* guix system: Convert to monadic style.Ludovic Courtès2014-07-13
| | | | | | | | | | | * guix/scripts/system.scm (references*, topologically-sorted*, show-what-to-build*): New procedures. (copy-closure): Turn into a monadic procedure. (install): Likewise, and adjust parameter list. (switch-to-system): Likewise. (system-derivation-for-action, grub.cfg, maybe-build, perform-action): New procedures. (guix-system): Use them.
* guix system: Add '--system' option.Ludovic Courtès2014-07-08
| | | | | | | | | | * guix/scripts/system.scm (switch-to-system): Add #:system parameter; pass it to 'run-with-store'. (%options): Add '--system'. (guix-system): Pass the 'system' option to 'run-with-store', 'package-derivation', and 'switch-to-system' calls. * doc/guix.texi (Invoking guix system): Document '--system' and '--image-size'.
* system: Install /var/guix/profiles/system-1-link on new systems.Ludovic Courtès2014-06-27
| | | | | | | | | | | | | | | | * guix/build/install.scm (directives): Add /var/guix/profiles/system. (populate-root-file-system): Add 'system' parameter. Create /var/guix/profiles/system-1-link. * guix/scripts/system.scm (install): Pass OS-DIR to 'populate-root-file-system'. * guix/build/vm.scm (initialize-root-partition): Add #:system-directory parameter, and pass it to 'populate-root-file-system'. (initialize-hard-disk): Add #:system-directory parameter, and pass it to 'initialize-root-partition'. * gnu/system/vm.scm (qemu-image): Add #:os-derivation parameter and pass it to 'initialize-hard-disk'. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Pass #:os-derivation to 'qemu-image.
* guix system: Add 'reconfigure' action.Ludovic Courtès2014-06-27
| | | | | | | | | | * guix/scripts/system.scm (%system-profile): New variable. (switch-to-system, previous-grub-entries): New procedures. (unless-file-not-found): New macro. (show-help): Add 'reconfigure'. (guix-system): Handle it. * gnu/system.scm: Export 'operating-system-activation-script'. * doc/guix.texi (Invoking guix system): Document it.
* guix {system,offload}: Improve reporting of syntax errors.Ludovic Courtès2014-06-27
| | | | | | | | | * guix/scripts/system.scm (read-operating-system) <catch handler>: Add case for 'syntax-error'. Correct message for default case. * guix/scripts/offload.scm (build-machines) <catch handler>: Add case for 'syntax-error'. * tests/guix-system.sh: New file. * Makefile.am (SH_TESTS): Add it.
* guix system: Gracefully handle 'install-grub' errors.Ludovic Courtès2014-06-24
| | | | | * guix/scripts/system.scm (install): Wrap 'install-grub' call in 'false-if-exception'. This is a followup to 641f9a2a.
* guix system: 'init' makes sure the target store directory exists.Ludovic Courtès2014-06-19
| | | | | * guix/scripts/system.scm (install): Before calling 'copy-closure', make sure directory (%store-prefix) under TARGET exists.
* guix system: Add 'disk-image' action.Ludovic Courtès2014-05-22
| | | | | | | | * guix/scripts/system.scm (show-help): Add 'disk-image'. (guix-system)[parse-options]: Support 'disk-image' action. [option-arguments]: Likewise. Handle the 'disk-image' action. * doc/guix.texi (Invoking guix system): Document 'disk-image'.
* guix system: Check whether we are installing to /.Ludovic Courtès2014-05-19
| | | | * guix/scripts/system.scm (install): Check whether TARGET is / and warn.
* guix system: Factorize out closure copy.Ludovic Courtès2014-05-19
| | | | | * guix/scripts/system.scm (copy-closure): New procedure. (install): Use it.
* guix system: 'guix system init' installs GRUB by default.Ludovic Courtès2014-05-19
| | | | | | | | | | | * guix/scripts/system.scm (install): Add #:grub?, #:grub.cfg, and #:device parameters; honor them. (show-help): Document '--no-grub'. (%options): Add '--no-grub'. (%default-options): Add 'install-grub?'. (guix-system): Honor 'install-grub?' option from OPTS. Adjust 'install' call accordingly. * doc/guix.texi (Invoking guix system): Document '--no-grub'.
* guix system: Add 'init' sub-command.Ludovic Courtès2014-05-18
| | | | | | | | | * guix/scripts/system.scm (install): New procedure. (guix-system)[parse-option]: Remove check for extraneous arguments. [match-pair, option-arguments]: New procedures. Use 'option-arguments'. Honor 'init'. (show-help): Document 'init'. * doc/guix.texi (Invoking guix system): Document 'init'.
* guix system: Add 'build' action.Ludovic Courtès2014-05-16
| | | | | | * guix/scripts/system.scm (show-help): Document 'build' action. (guix-system): Honor 'build' action. * doc/guix.texi (Invoking guix system): Add 'build' action.
* guix system: Add 'vm-image' action and '--image-size' option.Ludovic Courtès2014-04-09
| | | | | | | | | * guix/scripts/system.scm (%options): Add --image-size. (%default-options): Add 'image-size'. (guix-system)[parse-options]: Handle the 'vm-image' action. Honor them. (show-help): Update accordingly. * doc/guix.texi (Invoking guix system): Add 'vm-image'.
* hydra: Add 'qemu-image' job.Ludovic Courtès2014-04-05
| | | | | | | | * build-aux/hydra/demo-os.scm: New file. * Makefile.am (EXTRA_DIST): Add it. * build-aux/hydra/gnu-system.scm (qemu-jobs): New procedure. (hydra-jobs): Use it. * guix/scripts/system.scm (read-operating-system): Export.
* gnu: Introduce the (gnu services ...) modules.Ludovic Courtès2014-02-19
| | | | | | | | | | | * gnu/system/dmd.scm: Remove file. Move contents to... * gnu/services.scm, gnu/services/base.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/xorg.scm: ... here. New files. * gnu/system.scm, gnu/system/vm.scm: Adjust accordingly. * guix/scripts/system.scm (%user-module): Likewise. * doc/guix.texi (Using the Configuration System): Likewise. (Defining Services): Likewise.
* Add 'guix system'.Ludovic Courtès2014-02-18
* guix/scripts/system.scm: New file. * Makefile.am (MODULES): Add it. * po/POTFILES.in: Likewise. * doc/guix.texi (Using the Configuration System): Link to "Invoking guix system". (Invoking guix system): New node.