Allow switching between specialisations. #699
Workflow file for this run
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: "Build NH" | |
| on: | |
| pull_request: | |
| push: | |
| branches-ignore: | |
| - 'update-*' | |
| workflow_dispatch: | |
| jobs: | |
| build-linux: | |
| name: "Build NH on Linux" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: cachix/install-nix-action@master | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/checkout@v4 | |
| - run: nix build -L --no-link | |
| name: Build | |
| build-darwin: | |
| name: "Build NH on Darwin" | |
| runs-on: macos-latest | |
| steps: | |
| - uses: cachix/install-nix-action@master | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/checkout@v4 | |
| - run: nix build -L --no-link | |
| name: Build | |
| # FIXME: this should be moved out of the build workflow. It is **not** a build job | |
| # and opens the door to CI failures due to upstream (nix-darwin) errors. This should | |
| # instead me made into a VM test. | |
| - run: | | |
| mkdir flake | |
| cd flake | |
| nix flake init -t nix-darwin | |
| git add flake.nix | |
| cd .. | |
| nix run .#nh -- darwin switch --hostname simple --dry --no-nom --verbose ./flake | |
| name: Test Switching to Nix Darwin Configuration |