1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

Merge pull request #312 from tricktron/fix-install-flake-github-action

Fixes install flake GitHub action
This commit is contained in:
Daiderd Jordan 2021-05-26 18:27:47 +02:00 committed by GitHub
commit b8f941d091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View file

@ -21,7 +21,6 @@ jobs:
- run: |
nix-channel --add https://nixos.org/channels/nixpkgs-20.09-darwin nixpkgs
nix-channel --update
echo "FIXME workaround channel permission error"
- run: |
export NIX_PATH=$HOME/.nix-defexpr/channels
nix-shell -A installer
@ -38,17 +37,23 @@ 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
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- 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"
export NIX_PATH=$HOME/.nix-defexpr/channels
nix-shell -A installer
- 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: |

View file

@ -2,7 +2,7 @@
description = "Example darwin system flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-20.09-darwin";
nixpkgs.url = "github:nixos/nixpkgs";
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
};