I am trying to use nix-darwin to setup my computers. Currently just a single osx machine which is working great. I’m trying to break my flake.nix apart into multiple files so I can start generalizing and making modules, etc for different machines. I was able to pull most of the config out except one section in the modules regarding homebrew. How do I pull the nix-homebrew and mac-app-utils into another file (say darwin.nix)?
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew, homebrew-core, homebrew-cask, homebrew-bundle, mac-app-util, ... }: {
darwinConfigurations."ApplePi" = nix-darwin.lib.darwinSystem {
modules = [
./darwin.nix
nix-homebrew.darwinModules.nix-homebrew {
nix-homebrew =
{
# Install Homebrew under the default prefix
enable = true;
# Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2
enableRosetta = true;
# User owning the Homebrew prefix
user = "me";
# Optional: Declarative tap management
taps =
{
"homebrew/homebrew-core" = homebrew-core;
"homebrew/homebrew-cask" = homebrew-cask;
"homebrew/homebrew-bundle" = homebrew-bundle;
};
# Optional: Enable fully-declarative tap management
#
# With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`.
mutableTaps = false;
};
}
mac-app-util.darwinModules.default
];
};
};