1
0
Fork 0
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:
Daiderd Jordan 2018-08-03 20:14:28 +02:00
parent f6970956c3
commit 958ebb7966
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -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