install nixos with the normal installation instructions eg the curl command
enable flakes
mkdir -p ~/.config/nix
cd ~/.config/nix
touch nix.conf
# add `experimental-features = nix-command flakes` to nix.conf
copy flake to ~/.config/nix-darwin
nix-channel --remove nixpkgs nix-channel --add https://nixos.org/channels/nixpkgs-24.05-darwin nixpkgs nix-channel --update home-manager switch