Skip to content

Commit

Permalink
feat!(darwin): use aarch64 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
midchildan committed Nov 6, 2023
1 parent 08f2eb4 commit d030959
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build NixOS configuration
run: nix run '.#os' -- build -L --flake '.#ci' --print-build-logs
nix-darwin:
nix-darwin-amd64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build nix-darwin configuration
run: nix run '.#os' -- build -L --flake '.#ci' --print-build-logs
run: nix run '.#os' -- build -L --flake '.#ci-amd64' --print-build-logs
2 changes: 1 addition & 1 deletion nix/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ system = "x86_64-linux"
stateVersion = "23.05"

[os.darwin]
system = "x86_64-darwin"
system = "aarch64-darwin"

# NOTE: Make sure to understand what the following does. It's a good idea to
# override this option this per host.
Expand Down
1 change: 1 addition & 0 deletions nix/darwin/machines/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ in
# By default Nix-Darwin would look for a configuration whose name matches its
# hostname.
ci = importDarwin ./ci.nix { };
ci-amd64 = importDarwin ./ci.nix { system = "x86_64-darwin"; };
}
2 changes: 2 additions & 0 deletions nix/darwin/modules/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ in
nix.package = lib.mkDefault pkgs.nixVersions.${nix};
nix.extraOptions = ''
experimental-features = nix-command flakes
'' + lib.optionalString pkgs.stdenv.isAarch64 ''
extra-platforms = aarch64-darwin x86_64-darwin
'';
nixpkgs.config.allowUnfree = true;
services.nix-daemon.enable = lib.mkDefault true;
Expand Down

0 comments on commit d030959

Please sign in to comment.