nix-wrapper: Use $EDITOR when creating/editing flake.nix files

This commit is contained in:
Alexander Heldt
2023-11-12 14:28:46 +01:00
parent c623fe2c09
commit 815c168cfd

View File

@@ -39,7 +39,7 @@ EOF
chmod 700 "$FLAKE"
sed -i -e "s|./SRC_PATH|$PWD|" "$FLAKE"
${pkgs.vim}/bin/vim "$FLAKE"
$EDITOR "$FLAKE"
}
edit() {
@@ -48,7 +48,7 @@ EOF
exit 1
fi
${pkgs.vim}/bin/vim "$FLAKE_PATH/flake.nix"
$EDITOR "$FLAKE_PATH/flake.nix"
}
[ "$#" -eq 0 ] && usage && exit 0