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:
commit
b8f941d091
2 changed files with 12 additions and 7 deletions
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
|
@ -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: |
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue