1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

add flake test

This commit is contained in:
Daiderd Jordan 2020-10-18 14:36:51 +02:00
parent d865c6ae4c
commit 46198ef432
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -30,3 +30,23 @@ jobs:
- run: | - run: |
nix-shell -A uninstaller nix-shell -A uninstaller
nix-shell -A uninstaller.check 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