diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 552a690db..40dd739bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -151,6 +151,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 \ @@ -159,7 +162,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 }} @@ -184,6 +189,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 \ @@ -192,7 +200,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 dbcc420a1..4520b8ff0 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; }; }