diff --git a/systems/darwin.nix b/systems/darwin.nix index c3a62a23..48e726e7 100644 --- a/systems/darwin.nix +++ b/systems/darwin.nix @@ -1,27 +1,35 @@ args: -with args; let +with args; +with allSystemAttrs; let + lib = nixpkgs.lib; macosSystem = import ../lib/macosSystem.nix; - x64_args = { + base_args = { inherit nix-darwin home-manager; - system = allSystemAttrs.x64_darwin; - specialArgs = allSystemSpecialArgs.x64_darwin; - nixpkgs = nixpkgs-darwin; - }; - aarch64_args = { - inherit nix-darwin home-manager; - system = aarch64_darwin; - specialArgs = aarch64_darwin_specialArgs; nixpkgs = nixpkgs-darwin; }; in { # macOS's configuration darwinConfigurations = { - harmonica = - macosSystem (x64_args - // darwin_harmonica_modules); + harmonica = macosSystem ( + lib.attrsets.mergeAttrsList [ + base_args + darwin_harmonica_modules + { + system = allSystemAttrs.x64_darwin; + specialArgs = allSystemSpecialArgs.x64_darwin; + } + ] + ); - fern = - macosSystem (aarch64_args - // darwin_fern_modules); + fern = macosSystem ( + lib.attrsets.mergeAttrsList [ + base_args + darwin_fern_modules + { + system = aarch64_darwin; + specialArgs = allSystemSpecialArgs.aarch64_darwin; + } + ] + ); }; }