about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.nix23
1 files changed, 12 insertions, 11 deletions
diff --git a/flake.nix b/flake.nix
index 547b82e..d12617a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,13 +4,6 @@
   };
 
   outputs = { self, nixpkgs, ... }: let
-    pkgs_aarch64 = import nixpkgs {
-      system = "aarch64-darwin";
-    };
-    pkgs_x86 = import nixpkgs {
-      system = "x86_64-linux";
-    };
-
     packageVersions = {
       # Wyze Cam Outdoor v1 Firmware
       # https://support.wyze.com/hc/en-us/articles/360024852172-Release-Notes-Firmware
@@ -72,18 +65,26 @@
       };
     };
   in {
-    packages."aarch64-darwin" = nixpkgs.lib.mapAttrs
+    packages."aarch64-darwin" = let 
+      pkgs = import nixpkgs {
+        system = "aarch64-darwin";
+      };
+    in nixpkgs.lib.mapAttrs
       (name: attrs:
         import ./wyze.nix {
-          inherit pkgs_x86;
+          inherit pkgs;
           inherit attrs;
         }
       ) packageVersions;
 
-    packages."x86_64-linux" = nixpkgs.lib.mapAttrs
+    packages."x86_64-linux" = let
+      pkgs = import nixpkgs {
+        system = "x86_64-linux";
+      };
+    in nixpkgs.lib.mapAttrs
       (name: attrs:
         import ./wyze.nix {
-          inherit pkgs_aarch64;
+          inherit pkgs;
           inherit attrs;
         }
       ) packageVersions;