From 78e10ac43f4efbf6ce344968da313066c8dffa63 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Wed, 24 Mar 2021 20:26:32 +0100 Subject: [PATCH] Uses nix flakes as described [here](https://github.com/cachix/install-nix-action) --- .github/workflows/test.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4226c5a..e716b92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,17 +38,16 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - uses: cachix/install-nix-action@v12 + with: + install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210207_fd6eaa1/install + extra_nix_config: | + experimental-features = nix-command flakes - run: | - nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs - nix-channel --update - - run: | - NIX_PATH=$HOME/.nix-defexpr/channels nix-shell -A installer - echo "TODO installed doesn't support flakes, handle multi-user install" - - run: | - nix-build channel:nixpkgs-unstable -A nixUnstable -o nix-unstable - ./nix-unstable/bin/nix --experimental-features 'nix-command flakes' registry add darwin $PWD - ./nix-unstable/bin/nix --experimental-features 'nix-command flakes' build ./modules/examples#darwinConfigurations.simple.system + nix registry add darwin $PWD + nix build ./modules/examples#darwinConfigurations.simple.system - run: | ./result/sw/bin/darwin-rebuild switch --flake ./modules/examples#simple - run: |