about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <git@emile.space>2023-10-31 20:22:58 +0100
committerEmile <git@emile.space>2023-10-31 20:22:58 +0100
commitb750b71b63f69b9aec746efb202380072d500cb7 (patch)
treec0abe17ab257b6cfeba675835755aa87d849c806
parent7b14aca0efef72ae6dbc8a4dcb5fc6aab6f69de2 (diff)
formatting
-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;