From 46198ef432216a22e1cd16edf55b0f219b8e2387 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 18 Oct 2020 14:36:51 +0200 Subject: [PATCH] add flake test --- .github/workflows/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 765ed3fc..49e541b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,3 +30,23 @@ jobs: - run: | nix-shell -A uninstaller nix-shell -A uninstaller.check + install-flake: + runs-on: macos-10.15 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v8 + - run: | + nix-channel --update + echo "FIXME workaround channel permission error" + nix-shell -A installer + echo "TODO installed doesn't support flakes, handle multi-user install" + nix-shell -p gnused --run 'sed -i "s/# services.nix-daemon.enable/services.nix-daemon.enable/" modules/examples/simple.nix' + - run: | + nix-shell -p nixFlakes --run 'nix --experimental-features "nix-command flakes" registry add darwin $PWD' + nix-shell -p nixFlakes --run 'nix --experimental-features "nix-command flakes" build ./modules/examples#darwinConfigurations.simple.system' + - run: | + ./result/sw/bin/darwin-rebuild switch --flake ./modules/examples#darwinConfigurations.simple + - run: | + . /etc/static/bashrc + darwin-rebuild build --flake ./modules/examples#darwinConfigurations.simple