From a1f552138316d902c3aea46a07d7158ba1244879 Mon Sep 17 00:00:00 2001 From: aemogie <54412618+aemogie@users.noreply.github.com> Date: Fri, 3 May 2024 11:38:32 +0530 Subject: [PATCH] feat(direnv): forAllSystems --- direnv/flake.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/direnv/flake.nix b/direnv/flake.nix index 91cc9b6..f35050a 100644 --- a/direnv/flake.nix +++ b/direnv/flake.nix @@ -6,10 +6,18 @@ outputs = { nixpkgs, ... }: let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + forAllSystems = + function: + nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ] (system: function nixpkgs.legacyPackages.${system}); in { - devShells.${system}.default = pkgs.mkShell { packages = [ pkgs.hello ]; }; + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { packages = [ pkgs.hello ]; }; + }); }; }