summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2020-10-18 14:36:51 +0200
committerDaiderd Jordan <daiderd@gmail.com>2020-10-21 18:30:57 +0200
commit46198ef432216a22e1cd16edf55b0f219b8e2387 (patch)
tree85af59062632de902edc0c7291afa20f62cdce05 /.github
parentd865c6ae4c6d0e72f86cf274079f6b5890245fff (diff)
add flake test
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 765ed3f..49e541b 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