tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
748 stars 74 forks source link

Support flakes that pass `pkgs` to `nixosSystem` #91

Closed Enzime closed 10 months ago

Enzime commented 10 months ago

When pkgs is passed to nixosSystem directly, the nixpkgs.overlays option doesn't do anything.

tpwrules commented 10 months ago

I was not actually aware that passing pkgs to nixosSystem was possible. Is that function documented anywhere?

I think the preferred method is adding a module which sets nixpkgs.pkgs to your pkgs. Then nixpkgs.overlays will work properly.

Enzime commented 10 months ago

I can't find any documentation for it anywhere, but I know the three main module systems all support it (NixOS, nix-darwin and home-manager).

tpwrules commented 10 months ago

Are you intending to cross-compile a full system?

Enzime commented 10 months ago

The original reason behind why I made this PR was when I overrode hardware.asahi.pkgs with the overlay it still couldn't find mesa. I'm not intended to run a fully cross-compiled system at the moment, although it could be cool (combined with running a x86_64-linux builder locally like darwin.linux-builder)

Feel free to close this PR if you're not interested in this change at all