dots/lib/mkDarwinHost.nix
Gene Liverman 752c69e23d
Migrate neovim setup to neovim-flake
All of what was here is now there + it is updated and modernized and now
nix-native. No more Lazy, no more Mason.
2026-04-10 22:54:25 -04:00

54 lines
1.7 KiB
Nix

{ inputs, ... }:
{
mkDarwinHost =
{
system ? "aarch64-darwin",
hostname,
username ? "gene",
additionalModules ? [ ],
additionalSpecialArgs ? { },
}:
inputs.nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = {
inherit inputs hostname username;
}
// additionalSpecialArgs;
modules = [
./nixpkgs-settings.nix
inputs.nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
enable = true; # Install Homebrew under the default prefix
user = "${username}"; # User owning the Homebrew prefix
autoMigrate = true; # Automatically migrate existing Homebrew installations
};
}
inputs.home-manager.darwinModules.home-manager
{
home-manager = {
extraSpecialArgs = { inherit inputs username; };
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports = [
../modules/shared/home/general
../modules/shared/home/general/all-gui.nix
../modules/hosts/darwin/home.nix
../modules/hosts/darwin/${hostname}/home-${username}.nix
inputs.genebean-neovim.homeManagerModules.default
inputs.private-flake.homeManagerModules.private.git
(inputs.private-flake.homeManagerModules.private.${hostname} or { })
inputs.sops-nix.homeManagerModule # user-level secrets management
];
};
}
../modules/hosts/darwin # system-wide stuff
../modules/hosts/darwin/${hostname} # host specific stuff
]
++ additionalModules; # end modules
}; # end darwinSystem
}