No configuration.nix file after install of Nix on a M1 Mac

Hello all,

Mac M1

Max OS Monterey (12.7.6)

  • system: "aarch64-darwin"
  • host os: Darwin 21.6.0, macOS 12.7.6
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.24.9
  • channels(root): "nixpkgs"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixpkgs

Installed nix with:
curl -L https://nixos.org/nix/install | sh

From everything I have read there should be a:
/etc/nixos/configuration.nix
or
~/.nixpkgs/darwin-configuration.nix

However, neither is there.

So am I doing something wrong and missed it? Is there another step that I missed?

Would like to use this in place of the other options for package managers on this mac.

I am some what competent with Linux but it wouldn’t be the first time i missed something obvious.

Thanks for your help

If you want declarative macOS system configuration through a configuration.nix, you’ll want to use nix-darwin. It’s a separate community project, though it’s very popular and I can give my (biased) recommendation.

Another option if you just want to manage your user’s programs and configuration is Home Manager. They can be used together, as Home Manager ships a nix-darwin module.

1 Like

Thank you emily.

darwin it is then. I wish there was a note in the Mac install section about this.