nixos-rebuild: Support --option
This commit is contained in:
parent
ad65e807bd
commit
75583c7984
@ -36,10 +36,10 @@ Options:
|
||||
Various nix-build options are also accepted, in particular:
|
||||
|
||||
--show-trace show a detailed stack trace for evaluation errors
|
||||
|
||||
|
||||
Environment variables affecting nixos-rebuild:
|
||||
|
||||
\$NIX_PATH Nix expression search path
|
||||
\$NIX_PATH Nix expression search path
|
||||
\$NIXOS_CONFIG path to the NixOS system configuration specification
|
||||
EOF
|
||||
exit 1
|
||||
@ -85,6 +85,11 @@ while test "$#" -gt 0; do
|
||||
j="$1"; shift 1
|
||||
extraBuildFlags="$extraBuildFlags $i $j"
|
||||
;;
|
||||
--option)
|
||||
j="$1"; shift 1
|
||||
k="$1"; shift 1
|
||||
extraBuildFlags="$extraBuildFlags $i $j $k"
|
||||
;;
|
||||
--fast)
|
||||
buildNix=
|
||||
extraBuildFlags="$extraBuildFlags --show-trace"
|
||||
@ -202,7 +207,7 @@ fi
|
||||
if test "$action" = switch -o "$action" = boot -o "$action" = test; then
|
||||
# Just in case the new configuration hangs the system, do a sync now.
|
||||
sync
|
||||
|
||||
|
||||
$pathToConfig/bin/switch-to-configuration "$action"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user