Commit graph

46 commits

Author SHA1 Message Date
Eelco Dolstra 5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
Eelco Dolstra e5bcb378fa Add support for multiple system profiles
‘nixos-rebuild’ now accepts an argument ‘--profile-name’ (or ‘-p’),
denoting the name of a system profile to use.  The default is
‘system’, which maps to /nix/var/nix/profiles/system.  Any other value
maps to /nix/var/nix/profiles/system-profiles/<name>.  The GRUB menu
generator makes all system profiles available as submenus.  For
instance, doing

  $ nixos-rebuild boot -p test

will cause a menu named ‘NixOS - Profile 'test'’ to be added to the
GRUB boot menu, leaving the default system profile unaffected.

This is only supported for GRUB 2.
2013-10-09 19:13:26 +02:00
Ivan Kozik 425b0f0507 nixos-rebuild: support -vv, -vvv, -vvvv, and -vvvvv 2013-08-10 21:51:44 +00:00
aszlig 5a2390327d
nixos-rebuild: Allow to use --repair.
Unfortunately, the flag only works directly and without the daemon, so
this adds an extra variable $repair, to avoid the daemon. This is to
avoid to iterate through the $extraBuildFlags just to test whether
"--repair" exists.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-07-26 06:23:49 +02:00
Eelco Dolstra 986e236068 nixos-rebuild: Support Nix's --repair flag 2013-07-15 13:54:15 +02:00
Eelco Dolstra 365307ada1 nixos-rebuild: Handle .version-suffix not being writable
Reported by @vcunat.
2013-06-05 17:10:46 +02:00
Eelco Dolstra fbde5e027e Sync after installing the boot loader
Previously we synced just before calling switch-to-configuration.
That prevents corruption of the Nix store, but it can leave the boot
loader configuration and kernel files in /boot corrupted.  So do the
sync after installing the boot loader.
2013-03-28 16:11:54 +01:00
Eelco Dolstra 314adf9648 nixos-rebuild: Don't rely on $SHELL
Fixes #74.
2013-01-23 11:31:48 +01:00
Eelco Dolstra 6e7b0a0c0e Fix ‘nixos-rebuikd dry-run’ 2013-01-16 16:11:51 +01:00
Eelco Dolstra b35fe01f02 Set the NixOS version to something useful when building from Git 2013-01-16 14:40:41 +01:00
Eelco Dolstra ea358b4eae nixos-rebuild: Use ‘[ ... ]’ instead of ‘test’ 2013-01-16 13:21:59 +01:00
Eelco Dolstra 45f0de21f0 nixos-rebuild: Fix the check for running nix-daemon 2012-12-21 00:18:12 +01:00
Eelco Dolstra 97ae408e83 Merge remote-tracking branch 'origin/master' into systemd 2012-12-11 17:40:39 +01:00
Eelco Dolstra 13617b803b Use the binary cache in the installer
Also remove "nixos-rebuild pull".
2012-12-08 19:00:06 +01:00
Eelco Dolstra 994a15bc25 nixos-rebuild: Handle options with spaces in them
Like ‘--option binary-caches "http://foo http://bar"’
2012-11-22 12:04:00 +01:00
Eelco Dolstra 75583c7984 nixos-rebuild: Support --option 2012-09-14 13:23:19 -04:00
Eelco Dolstra 348691645d Remove broken "nopipefail" option
http://hydra.nixos.org/build/2751337
2012-07-02 10:57:36 -04:00
Lluís Batlle i Rossell de87b07bb3 nixos-rebuild: fail if any case of pull fails. 2012-06-27 21:57:15 +02:00
Lluís Batlle i Rossell 5b7c019e2a nixos-rebuild: make 'pull' fail in case it did not pull anything. 2012-06-27 21:36:46 +02:00
Eelco Dolstra cc357c7e64 nixos-rebuild: Add a convenience option ‘--upgrade’
This is equivalent to running ‘nix-channel --update nixos’ before
running ‘nixos-rebuild’.
2012-06-25 16:17:34 -04:00
Eelco Dolstra f8e36664a6 * Subtle: since nix-env processes flags in order, any ‘-I’ flag should
come before ‘-f <nixos>’.

svn path=/nixos/trunk/; revision=33831
2012-04-18 15:01:42 +00:00
Eelco Dolstra b4afefcc40 * Typo.
svn path=/nixos/trunk/; revision=33826
2012-04-18 12:32:17 +00:00
Eelco Dolstra 395d73db70 * nixos-rebuild: don't do a pull of the manifest by default anymore.
It's not necessary when using the NixOS channel.  "nixos-rebuild
  pull" now pulls from the NixOS channel.

svn path=/nixos/trunk/; revision=33825
2012-04-18 11:46:16 +00:00
Eelco Dolstra 1949a85987 * Do a sync before switching to a new configuration.
svn path=/nixos/trunk/; revision=33381
2012-03-23 12:29:11 +00:00
Eelco Dolstra 65824d40e1 * nixos-rebuild: pass on the -I option to nix-build.
svn path=/nixos/trunk/; revision=32741
2012-03-02 13:31:12 +00:00
Eelco Dolstra 29d84af677 * Remove the use of the NIXPKGS and NIXOS environment variables.
Instead use $NIX_PATH.  NIXOS_CONFIG is still supported.

svn path=/nixos/trunk/; revision=32739
2012-03-02 12:38:22 +00:00
Peter Simons 20b364f4de Reverting revisions 30103-30106: "always set nixpkgs.config.{state,store}Dir", etc.
After the change from revision 30103, nixos-rebuild suddenly consumed
freaky amounts of memory. I had to abort the process after it had
allocated well in excess of 30GB(!) of RAM. I'm not sure what is causing
this behavior, but undoing that assignment fixes the problem. The other
two commits needed to be revoked, too, because they depend on 30103.

svn path=/nixos/trunk/; revision=30127
2011-10-30 15:19:58 +00:00
Shea Levy fe045dc949 sed -i -e 's|/nix/var|@stateDir@|g' -e 's|/nix/store|@storeDir@|g' modules/installer/tools/*.sh
Use configurable storeDir and stateDir in the installer tools

svn path=/nixos/trunk/; revision=30106
2011-10-29 22:14:27 +00:00
Eelco Dolstra 6f1068b0b7 * Remove the unnecessary warning printed by `nixos-rebuild test'. The
current configuration (/var/run/current-system) is always a GC root.

svn path=/nixos/trunk/; revision=26227
2011-03-09 12:14:06 +00:00
Eelco Dolstra f1277862cd * Handle --cores.
svn path=/nixos/trunk/; revision=26188
2011-03-07 12:12:53 +00:00
Eelco Dolstra 5cff6eda3d * Revert r21410 because it breaks handling of "--max-jobs".
svn path=/nixos/trunk/; revision=26187
2011-03-07 12:12:39 +00:00
Eelco Dolstra c1295661c4 * Added a command `nixos-rebuild build-vm-with-bootloader'. This is
like `build-vm', but boots using the regular boot loader (i.e. GRUB
  1 or 2) rather than booting directly from the kernel/initrd.  Thus
  it allows testing of GRUB.

svn path=/nixos/trunk/; revision=23747
2010-09-13 12:34:58 +00:00
Eelco Dolstra f1dde44ac1 * Added an action `nixos-rebuild pull' to just pull the Nixpkgs
channel manifest and exit.  Useful if you don't want to use
  nix-channel.

svn path=/nixos/trunk/; revision=22601
2010-07-14 14:18:27 +00:00
Marc Weber ce642f0cc2 nixos-rebuild: accept both: -jn and -j n
svn path=/nixos/trunk/; revision=21410
2010-04-28 19:52:03 +00:00
Yury G. Kudryashov a30637aba5 Really use nix-worker in nixos-rebuild
svn path=/nixos/trunk/; revision=21307
2010-04-25 18:26:51 +00:00
Eelco Dolstra 1065e86642 * In nixos-rebuild, build config.environment.nix before trying nixFallback or nixUnstable.
svn path=/nixos/trunk/; revision=20376
2010-03-04 14:38:53 +00:00
Eelco Dolstra 6a06118f85 * Use the build flags given on the command line while building Nix.
svn path=/nixos/trunk/; revision=19799
2010-02-03 22:49:50 +00:00
Marc Weber 4378018164 nixos-rebuild: allow passing --fallback
replacing if .. fi by case .. esac

svn path=/nixos/trunk/; revision=19186
2010-01-03 13:36:23 +00:00
Eelco Dolstra f26080c5f4 * Clean up the nixos-rebuild output a bit.
svn path=/nixos/trunk/; revision=18859
2009-12-09 18:23:48 +00:00
Marc Weber fceadcbef7 --redo -> --fast
svn path=/nixos/trunk/; revision=17839
2009-10-15 23:39:57 +00:00
Marc Weber f3472f7163 new nixos-rebuild shortcut for --no-fetch --no-nix-build --show-trace called --redo
svn path=/nixos/trunk/; revision=17813
2009-10-14 23:56:11 +00:00
Nicolas Pierron 923f58794a Add --rollback option to nixos-rebuild.
svn path=/nixos/trunk/; revision=16771
2009-08-19 15:04:19 +00:00
Eelco Dolstra 89ef5c979b * New nixos-rebuild action: "nixos-rebuild build-vm" builds a virtual
machine containing a replica (minus the state) of the system
  configuration.  This is mostly useful for testing configuration
  changes prior to doing an actual "nixos-rebuild switch" (or even
  "nixos-rebuild test").  The VM can be started as follows:

  $ nixos-rebuild build-vm
  $ ./result/bin/run-*-vm

  which starts a KVM/QEMU instance.  Additional QEMU options can be
  passed through the QEMU_OPTS environment variable
  (e.g. QEMU_OPTS="-redir tcp:8080::80" to forward a host port to the
  guest).  The fileSystem attribute of the regular system
  configuration is ignored (using mkOverride), because obviously we
  can't allow the VM to access the host's block devices.  Instead, at
  startup the VM creates an empty disk image in ./<hostname>.qcow2 to
  store the VM's root filesystem.

  Building a VM in this way is efficient because the VM shares its Nix
  store with the host (through a CIFS mount).  However, because the
  Nix store of the host is mounted read-only in the guest, you cannot
  run Nix build actions inside the VM.  Therefore the VM can only be
  reconfigured by re-running "nixos-rebuild build-vm" on the host and
  restarting the VM.

svn path=/nixos/trunk/; revision=16662
2009-08-11 01:35:56 +00:00
Eelco Dolstra 383370f782 * Don't create a temporary file in $HOME.
svn path=/nixos/branches/modular-nixos/; revision=16561
2009-08-03 12:44:45 +00:00
Eelco Dolstra 6802a75076 * nixos-rebuild: replaced some environment variables with options
(e.g. --install-grub instead of $NIXOS_INSTALL_GRUB).  Also support
  some nix-build options (e.g. --show-trace and -j).

svn path=/nixos/branches/modular-nixos/; revision=16560
2009-08-03 12:36:15 +00:00
Eelco Dolstra f36643b6c2 * Move the installer tools to modules/installer/tools.
svn path=/nixos/branches/modular-nixos/; revision=15788
2009-05-29 12:41:29 +00:00
Renamed from installer/nixos-rebuild.sh (Browse further)