Test switching to darwin configuration #450
Workflow file for this run
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: "Build NH" | |
on: | |
pull_request: | |
push: | |
branches-ignore: | |
- 'update-*' | |
workflow_dispatch: | |
jobs: | |
build: | |
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 | |
- run: | | |
eval "$(nix print-dev-env)" | |
./fix.sh | |
git diff-index --quiet HEAD | |
name: Check formatting | |
Test_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 | |
- run: | | |
NH_DIR=$(pwd) | |
NH_FLAKE=/tmp/nh-darwin | |
mkdir -p $NH_FLAKE | |
cd $NH_FLAKE | |
nix flake init -t nix-darwin | |
cd $NH_DIR | |
nix run -L .#nh -- darwin switch --hostname simple --dry --no-nom --verbose $NH_FLAKE | |
name: Test Switching to Nix Darwin Configuration |