diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 29be3c5..62c0db4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,23 +17,25 @@ jobs: - run: nix fmt . -- --check - run: nix flake check tests-darwin: - runs-on: macos-11 + runs-on: macos-12 steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 - with: - extra_nix_config: | - system-features = nixos-test recursive-nix benchmark big-parallel kvm - extra-experimental-features = recursive-nix nix-command flakes + - uses: cachix/install-nix-action@v24 - run: nix build - run: nix build .#doc - run: nix fmt . -- --check - run: nix flake check - name: "Install nix-darwin module" run: | - system=$(nix build --no-link --print-out-paths .#checks.x86_64-darwin.integration) - ${system}/activate-user - sudo ${system}/activate + # https://github.com/ryantm/agenix/pull/230#issuecomment-1867025385 + + sudo mv /etc/nix/nix.conf{,.bak} + nix \ + --extra-experimental-features 'nix-command flakes' \ + build .#checks.x86_64-darwin.integration + + ./result/activate-user + sudo ./result/activate - name: "Test nix-darwin module" run: | sudo /run/current-system/sw/bin/agenix-integration diff --git a/flake.nix b/flake.nix index 0b26862..376c2f2 100644 --- a/flake.nix +++ b/flake.nix @@ -65,7 +65,9 @@ inherit system; modules = [ ./test/integration_darwin.nix - darwin.darwinModules.simple + + # Allow new-style nix commands in CI + {nix.extraOptions = "experimental-features = nix-command flakes";} home-manager.darwinModules.home-manager {