summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2017-02-11 15:52:23 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-02-13 21:52:32 +0200
commit2000f0941e5de5ce62ede09f2003ff3ccfcd26ac (patch)
tree89566470d070d5cda645b180eb040a2d194ba722 /nixos/modules
parent23fee8bfbddd8ce4c0a38ff4cbdd3cc9481232bd (diff)
downloadnixpkgs-2000f0941e5de5ce62ede09f2003ff3ccfcd26ac.tar
nixpkgs-2000f0941e5de5ce62ede09f2003ff3ccfcd26ac.tar.gz
nixpkgs-2000f0941e5de5ce62ede09f2003ff3ccfcd26ac.tar.bz2
nixpkgs-2000f0941e5de5ce62ede09f2003ff3ccfcd26ac.tar.lz
nixpkgs-2000f0941e5de5ce62ede09f2003ff3ccfcd26ac.tar.xz
nixpkgs-2000f0941e5de5ce62ede09f2003ff3ccfcd26ac.tar.zst
nixpkgs-2000f0941e5de5ce62ede09f2003ff3ccfcd26ac.zip
nixos-rebuild: Don't build nixos-rebuild with --fast
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/installer/tools/nixos-rebuild.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh
index 846f79d77f4..4f73865dad6 100644
--- a/nixos/modules/installer/tools/nixos-rebuild.sh
+++ b/nixos/modules/installer/tools/nixos-rebuild.sh
@@ -15,6 +15,7 @@ origArgs=("$@")
 extraBuildFlags=()
 action=
 buildNix=1
+fast=
 rollback=
 upgrade=
 repair=
@@ -66,6 +67,7 @@ while [ "$#" -gt 0 ]; do
         ;;
       --fast)
         buildNix=
+        fast=1
         extraBuildFlags+=(--show-trace)
         ;;
       --profile-name|-p)
@@ -217,7 +219,7 @@ if [ -z "$_NIXOS_REBUILD_REEXEC" ]; then
 fi
 
 # Re-execute nixos-rebuild from the Nixpkgs tree.
-if [ -z "$_NIXOS_REBUILD_REEXEC" -a -n "$canRun" ]; then
+if [ -z "$_NIXOS_REBUILD_REEXEC" -a -n "$canRun" -a -z "$fast" ]; then
     if p=$(nix-build --no-out-link --expr 'with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild' "${extraBuildFlags[@]}"); then
         export _NIXOS_REBUILD_REEXEC=1
         exec $p/bin/nixos-rebuild "${origArgs[@]}"