tpwrules / nixos-apple-silicon

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

Issues with building m1n1 (nix on macos) #173

Open ntrp opened 3 months ago

ntrp commented 3 months ago

Hi I am following the step by step docu and I am stuck on the first step, when I run the command inside the repository I get: error: flake 'git+file:///Users/ntrp/_pws/nixos-apple-silicon' does not provide attribute 'packages.aarch64-darwin.m1n1', 'legacyPackages.aarch64-darwin.m1n1' or 'm1n1'

Any idea what am I doing wrong? Bear in mind I have nix on macos..

mi-skam commented 3 months ago

You cannot build it on darwin, you either need to run it in on a vm (I use UTM) or a different NixOS machine

tpwrules commented 3 months ago

This is correct, you need a Linux machine to build stuff. Either aarch64 or x86_64 is fine.

I suggest using the prebuilt ISO available from the Releases page. Then you don’t have to compile anything yourself.

lovesegfault commented 3 months ago

There's always https://daiderd.com/nix-darwin/manual/index.html#opt-nix.linux-builder.enable

tpwrules commented 3 months ago

I had noticed that but hadn’t had an opportunity to try it or vet it for this application. I guess the actual VM is in Nixpkgs but nix-darwin just helps set it up with the system? Are there docs anywhere?

lovesegfault commented 3 months ago

I guess the actual VM is in Nixpkgs but nix-darwin just helps set it up with the system?

AIUI, yes.

I'm not sure about more in-depth docs, but the setup is pretty trivial with nix-darwin, works seamlessly.

ntrp commented 3 months ago

Ah ok, I did not even realize there is a prebuilt ISO, works great for me. I will try that one in the meantime!