refactor(hosts): meta setup #613
This file contains hidden or 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: Validate | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| concurrency: | |
| group: ci-${{ github.ref }}-validate | |
| cancel-in-progress: true | |
| env: | |
| NIX_CONFIG: "extra-experimental-features = nix-command flakes" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/nix-installer-action@v12 | |
| - uses: cachix/cachix-action@v12 | |
| with: | |
| name: fbosch | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| - name: Lint Nix code | |
| run: nix run '.#lint' | |
| - name: Flake checks | |
| run: nix flake check --print-build-logs --keep-going | |
| build-nixos: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| strategy: | |
| matrix: | |
| host: [rvn-vm, rvn-pc, rvn-srv] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/nix-installer-action@v12 | |
| - uses: cachix/cachix-action@v12 | |
| with: | |
| name: fbosch | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| - name: Evaluate ${{ matrix.host }} | |
| run: | | |
| nix eval ".#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel" --json > /dev/null | |
| - name: Dry-run build ${{ matrix.host }} | |
| run: | | |
| nix build ".#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel" --dry-run --print-build-logs | |
| eval-darwin: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| strategy: | |
| matrix: | |
| host: [rvn-mac] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/nix-installer-action@v12 | |
| - uses: cachix/cachix-action@v12 | |
| with: | |
| name: fbosch | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| - name: Evaluate ${{ matrix.host }} | |
| run: | | |
| nix eval ".#darwinConfigurations.${{ matrix.host }}.config.system.build.toplevel" --json > /dev/null |