ci: prevent flake inputs from GC as well
All checks were successful
Flake checks / Check (pull_request) Successful in 5m29s
All checks were successful
Flake checks / Check (pull_request) Successful in 5m29s
This commit is contained in:
parent
60aef1d038
commit
c580fe0fbb
|
@ -58,4 +58,14 @@ jobs:
|
||||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
||||||
build --out-link ./result-$target ".#nixosConfigurations.${target}.config.system.build.toplevel"
|
build --out-link ./result-$target ".#nixosConfigurations.${target}.config.system.build.toplevel"
|
||||||
done
|
done
|
||||||
|
|
||||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check
|
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check
|
||||||
|
|
||||||
|
# Add GC roots for flake inputs, too
|
||||||
|
# https://github.com/NixOS/nix/issues/4250#issuecomment-1146878407
|
||||||
|
mkdir --parents "$NIX_USER_PROFILE_DIR"
|
||||||
|
gc_root_prefix="$NIX_USER_PROFILE_DIR"/infra-flake-
|
||||||
|
echo "Adding gcroots flake inputs with prefix $gc_root_prefix ..."
|
||||||
|
nix flake archive --json 2>/dev/null | jq --raw-output '.inputs | to_entries[] | "ln --force --symbolic --no-target-directory "+.value.path+" \"'"$gc_root_prefix"'"+.key+"\""' | while read -r line; do
|
||||||
|
eval "$line"
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in a new issue