diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43aed103..b9eb32f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -149,6 +149,9 @@ jobs: /usr/bin/sed -i.bak \ "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ flake.nix + /usr/bin/sed -i.bak \ + 's/nixpkgs.hostPlatform = "aarch64-darwin";/nixpkgs.hostPlatform = "'$(nix eval --expr builtins.currentSystem --impure --raw)'";/' \ + flake.nix popd nix run .#darwin-rebuild -- \ switch --flake ~/.config/nix-darwin#simple \ @@ -157,7 +160,9 @@ jobs: - name: Rebuild and activate simple flake, but this time using nix-darwin's flake interface run: | . /etc/static/bashrc - darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} + darwin-rebuild switch --flake ~/.config/nix-darwin#simple \ + --override-input nix-darwin . \ + --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - name: Test uninstallation of nix-darwin run: | nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} @@ -182,6 +187,9 @@ jobs: /usr/bin/sed -i.bak \ "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ flake.nix + /usr/bin/sed -i.bak \ + 's/nixpkgs.hostPlatform = "aarch64-darwin";/nixpkgs.hostPlatform = "'$(nix eval --expr builtins.currentSystem --impure --raw)'";/' \ + flake.nix popd nix run .#darwin-rebuild -- \ switch --flake ~/.config/nix-darwin#simple \ @@ -190,7 +198,9 @@ jobs: - name: Rebuild and activate simple flake, but this time using nix-darwin's flake interface run: | . /etc/static/bashrc - darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/nixpkgs-unstable + darwin-rebuild switch --flake ~/.config/nix-darwin#simple \ + --override-input nix-darwin . \ + --override-input nixpkgs nixpkgs/nixpkgs-unstable - name: Test uninstallation of nix-darwin run: | nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/nixpkgs-unstable diff --git a/modules/examples/flake/flake.nix b/modules/examples/flake/flake.nix index dbcc420a..4520b8ff 100644 --- a/modules/examples/flake/flake.nix +++ b/modules/examples/flake/flake.nix @@ -30,7 +30,7 @@ system.stateVersion = 5; # The platform the configuration will be used on. - nixpkgs.hostPlatform = "x86_64-darwin"; + nixpkgs.hostPlatform = "aarch64-darwin"; }; in { @@ -39,8 +39,5 @@ darwinConfigurations."simple" = nix-darwin.lib.darwinSystem { modules = [ configuration ]; }; - - # Expose the package set, including overlays, for convenience. - darwinPackages = self.darwinConfigurations."simple".pkgs; }; }