I was looking for a recent how-to with a few bells a whistles to setup nix-darwin with home-manager with flakes on my new M1 Macbook Pro and ended up doing a small gist, with code heavily inspired from the awesome GitHub - malob/nixpkgs: My Nix system configs!
The other walk throughs I found seem to have some workarounds that aren’t needed anymore, so the installation is actually pretty simple.
I included things in the config that I know I end up needing all the time, like overlays that are available in home-manager, including x86 version of packages that don’t build on Apple Silicon yet and a few things I didn’t know I needed yet (like nix-index and touch ID for sudo, straight from @malob’s repo!).
I tried to minimise the number of files, which means I inlined some patches in the flake.nix which can be removed when the corresponding PRs are merged upstream. For a more thorough and modular setup (including dealing with multiple machines and a neat primaryUser trick) refer to GitHub - malob/nixpkgs: My Nix system configs!
Here is the gist and hope it helps Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro · GitHub