Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace "path:" with "./" #12

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bento
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ FLAKES=$(
for flakes in $(find . -name flake.nix)
do
TARGET="$(dirname "${flakes}")"
nix flake show --json "path:$TARGET" | jq -r '.nixosConfigurations | keys[]'
nix flake show --json "./$TARGET" | jq -r '.nixosConfigurations | keys[]'
done
)

Expand All @@ -649,7 +649,7 @@ else
for flakes in $(find . -name flake.nix)
do
TARGET="$(dirname $flakes)"
FLAKES_IN_DIR=$(nix flake show --json "path:$TARGET" | jq -r '.nixosConfigurations | keys[]')
FLAKES_IN_DIR=$(nix flake show --json "./$TARGET" | jq -r '.nixosConfigurations | keys[]')
if echo "${FLAKES_IN_DIR}" | grep "^${NAME}$" >/dev/null
then
# we need to keep the flake directory path
Expand Down Expand Up @@ -705,7 +705,7 @@ then
test -d "$i" || continue
if [ -f "$i/flake.nix" ]
then
for host in $(nix flake show --json "path:${i}" | jq -r '.nixosConfigurations | keys[]')
for host in $(nix flake show --json "./${i}" | jq -r '.nixosConfigurations | keys[]')
do
test -n "${SINGLE_FLAKE}" && ! [ "$host" = "${SINGLE_FLAKE}" ] && continue
printf "%${PRETTY_OUT_COLUMN}s " "${host}"
Expand Down Expand Up @@ -749,7 +749,7 @@ then
do
if [ -f "$i/flake.nix" ]
then
for host in $(nix flake show --json "path:${i}" | jq -r '.nixosConfigurations | keys[]')
for host in $(nix flake show --json "./${i}" | jq -r '.nixosConfigurations | keys[]')
do
test -n "${SINGLE_FLAKE}" && ! [ "$host" = "${SINGLE_FLAKE}" ] && continue
deploy_files "$i" "${host}" "${host}"
Expand Down Expand Up @@ -785,7 +785,7 @@ then
echo "$directory"
if [ -z "$2" ]
then
nix flake update path:"$directory"
nix flake update ./"$directory"
else
cd "$directory" >/dev/null || exit 5
nix flake lock --update-input "$2"
Expand Down