FIX: darwin version now works!

This commit is contained in:
lsoriano-mcm
2025-07-03 20:45:15 -05:00
parent b4f4b67a8b
commit 8491971427
7 changed files with 548 additions and 28 deletions
+32 -21
View File
@@ -17,6 +17,10 @@
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nixovim = {
url = "git+https://git.sakamoto.dev/kenji/nixovim.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
@@ -26,45 +30,52 @@
home-manager,
darwin,
...
} @ inputs:
} @ inputs: let
# Define common arguments or functions here if needed
config = import ./config.nix;
# A helper function to create arguments for modules
mkArgs = system:
{
inherit inputs system;
}
// config;
in
flake-utils.lib.eachDefaultSystem (
system: let
config = import ./config.nix;
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
args = {inherit inputs system;} // config;
args = mkArgs system; # Use the helper for common args
in {
nixosConfigurations = {
desktop = lib.nixosSystem {
inherit system;
specialArgs = args;
modules = [];
modules = []; # Add your NixOS modules here
};
};
homeConfigurations = {
# Assuming you want home-manager configurations for all default systems
desktop = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
extraSpecialArgs = args;
modules = [];
};
};
};
darwinConfigurations = {
macos = darwin.lib.darwinSystem {
inherit system;
specialArgs = args;
modules = [
./hosts/macos/darwin.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = args;
}
];
modules = []; # Add your Home Manager modules here
};
};
}
);
)
// {
darwinConfigurations = {
macos = darwin.lib.darwinSystem {
system = "aarch64-darwin";
# *** CRITICAL CHANGE HERE ***
# Pass the result of mkArgs, AND the mkArgs function itself
specialArgs = (mkArgs "aarch64-darwin") // {inherit mkArgs;};
modules = [
./hosts/macos/darwin.nix
];
};
};
};
}