mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
darwin-rebuild: don't run nix-build for edit
This commit is contained in:
parent
f6970956c3
commit
958ebb7966
1 changed files with 5 additions and 5 deletions
|
@ -95,6 +95,11 @@ if ! [ "$action" = build ]; then
|
|||
extraBuildFlags+=("--no-out-link")
|
||||
fi
|
||||
|
||||
if [ "$action" = edit ]; then
|
||||
darwinConfig=$(nix-instantiate --eval --strict -E "<darwin-config>")
|
||||
exec ${EDITOR:-nano} "$darwinConfig"
|
||||
fi
|
||||
|
||||
if ! [ "$action" = list -o "$action" = rollback ]; then
|
||||
echo "building the system configuration..." >&2
|
||||
systemConfig="$(nix-build '<darwin>' ${extraBuildFlags[@]} -A system)"
|
||||
|
@ -146,8 +151,3 @@ if [ "$action" = check ]; then
|
|||
export checkActivation=1
|
||||
$systemConfig/activate-user
|
||||
fi
|
||||
|
||||
if [ "$action" = edit ]; then
|
||||
darwinConfig=$(nix-instantiate --eval --strict -E "<darwin-config>")
|
||||
${EDITOR:-nano} "$darwinConfig"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue