Try gargabe collecting #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nix build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: jlumbroso/free-disk-space@main | |
with: | |
large-packages: false | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v27 | |
with: | |
extra_nix_config: | | |
trusted-public-keys = nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
substituters = https://nix-gaming.cachix.org https://cache.nixos.org | |
connect-timeout = 5 | |
system-features = nixos-test benchmark big-parallel kvm | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: joinemm | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: build all hosts | |
run: | | |
set -e | |
for host in `nix flake show --json | jq '.nixosConfigurations | keys[]'`; do | |
echo "--- Building configuration for \"$host\" ---" | |
nix build .#nixosConfigurations.$host.config.system.build.toplevel --no-link | |
nix-collect-garbage | |
done | |