From 38646193bb1ed35508a0a77dc60365b55439544a Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Thu, 22 Aug 2024 16:33:25 +0200 Subject: [PATCH] flake: Filter packages and shells by platform --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index db32a21..24f2f33 100644 --- a/flake.nix +++ b/flake.nix @@ -94,7 +94,8 @@ packages = eachFlakeSystem (system: let pkgs = self.legacyPackages.${system}; in load ./package "package" - |> lib.mapAttrs (name: pkg: self.legacyPackages.${system}.callPackage pkg { })); + |> lib.mapAttrs (name: pkg: self.legacyPackages.${system}.callPackage pkg { }) + |> lib.filterAttrs (name: pkg: lib.meta.availableOn { inherit system; } pkg)); nixosModules = load ./nixos/module "module"; @@ -120,7 +121,8 @@ homeConfigurations = load ./home/config "home"; devShells = eachFlakeSystem (system: load ./shell "shell" - |> lib.mapAttrs (name: shell: self.legacyPackages.${system}.callPackage shell { })); + |> lib.mapAttrs (name: shell: self.legacyPackages.${system}.callPackage shell { }) + |> lib.filterAttrs (name: shell: lib.meta.availableOn { inherit system; } shell)); checks = eachFlakeSystem (system: { packages = self.packages.${system};