lkjljkdsalkj
This commit is contained in:
parent
2885b83f70
commit
2468624990
27
.envrc
27
.envrc
@ -9,6 +9,14 @@ fi
|
|||||||
# TODO:
|
# TODO:
|
||||||
# git config --local core.hooksPath "$PWD"/.githooks
|
# git config --local core.hooksPath "$PWD"/.githooks
|
||||||
|
|
||||||
|
flake_shell=.#envrc
|
||||||
|
if [[ -f .remote.toml ]]; then
|
||||||
|
flake_shell+=-remotes
|
||||||
|
fi
|
||||||
|
if [[ ! -f /run/current-system/nixos-version ]]; then
|
||||||
|
flake_shell+=-fhs
|
||||||
|
fi
|
||||||
|
|
||||||
# ensure (dirty) updated flake lock
|
# ensure (dirty) updated flake lock
|
||||||
# TODO: cache this on gitea? Run in background?
|
# TODO: cache this on gitea? Run in background?
|
||||||
now="$(date +%Y-%m-%d)"
|
now="$(date +%Y-%m-%d)"
|
||||||
@ -47,8 +55,16 @@ if [[ ! -s .direnv/pull-date || "$now" != "$(cat .direnv/pull-date)" ]]; then
|
|||||||
if command -v pueue >/dev/null && pueue status >&/dev/null; then
|
if command -v pueue >/dev/null && pueue status >&/dev/null; then
|
||||||
nix flake update "${update_args[@]}"
|
nix flake update "${update_args[@]}"
|
||||||
else
|
else
|
||||||
echo >&2 "+ pueue add nix flake update ..."
|
(
|
||||||
pueue add --escape --immediate nix flake update "${update_args[@]}"
|
echo >&2 "+ pueue add --escape --immediate nix flake update ..."
|
||||||
|
task_id=$(
|
||||||
|
pueue add --print-task-id --escape --immediate nix flake update "${update_args[@]}" \
|
||||||
|
| tee >(xargs -d'\n' printf >&2 "New task added (id %s).\n")
|
||||||
|
)
|
||||||
|
(set -x
|
||||||
|
pueue add --after="$task_id" --escape nix print-dev-env "$flake_shell"
|
||||||
|
)
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
unset update_args
|
unset update_args
|
||||||
|
|
||||||
@ -56,13 +72,6 @@ if [[ ! -s .direnv/pull-date || "$now" != "$(cat .direnv/pull-date)" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# source env
|
# source env
|
||||||
flake_shell=.#envrc
|
|
||||||
if [[ -f .remote.toml ]]; then
|
|
||||||
flake_shell+=-remotes
|
|
||||||
fi
|
|
||||||
if [[ ! -f /run/current-system/nixos-version ]]; then
|
|
||||||
flake_shell+=-fhs
|
|
||||||
fi
|
|
||||||
use flake "$flake_shell"
|
use flake "$flake_shell"
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user