ci: prevent nix garbage collection
All checks were successful
Flake checks / Check (pull_request) Successful in 5m36s
All checks were successful
Flake checks / Check (pull_request) Successful in 5m36s
This commit is contained in:
parent
fa9ce9d435
commit
60aef1d038
|
@ -48,13 +48,14 @@ jobs:
|
||||||
|
|
||||||
- name: Run flake checks
|
- name: Run flake checks
|
||||||
run: |
|
run: |
|
||||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check
|
# Prevent cache garbage collection by creating GC roots
|
||||||
# Prevent cache garbage collection
|
|
||||||
for target in $(nix flake show --json --all-systems | jq '
|
for target in $(nix flake show --json --all-systems | jq '
|
||||||
.["nixosConfigurations"] |
|
.["nixosConfigurations"] |
|
||||||
to_entries[] |
|
to_entries[] |
|
||||||
.key
|
.key
|
||||||
' | tr -d '"'
|
' | tr -d '"'
|
||||||
); do
|
); do
|
||||||
nix profile install --profile "/nix/var/nix/profiles/$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
|
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue