From cddd8101c7d67e2219ab9ccd133b94c4bce065af Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 22 Dec 2023 09:49:09 +0800 Subject: [PATCH] fix: darwin fern --- systems/darwin.nix | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) 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; + } + ] + ); }; }