From 39dea4d3636b3162c7ff72977c25e7c713faade1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Jan 2025 13:00:31 +0100 Subject: Attempt to get Rpi to work --- flake.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 0639d2c..52da5f4 100644 --- a/flake.nix +++ b/flake.nix @@ -62,17 +62,23 @@ } // eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}".extend self.overlays.default; - in { - packages = - {default = pkgs.nixdeploy;} - // mapAttrs' (n: v: let + + osFilterMap = attr: + mapAttrs' (n: v: let os = if v.config.nixpkgs.hostPlatform.system == system then v else (v.extendModules {modules = [{nixpkgs.buildPlatform.system = system;}];}); in - nameValuePair "tarball-${n}" os.config.system.build.tarball) - (filterAttrs (_: v: v.config.system.build ? tarball) self.nixosConfigurations); + nameValuePair "${attr}-${n}" os.config.system.build."${attr}") + (filterAttrs (_: v: v.config.system.build ? "${attr}") + self.nixosConfigurations); + in { + packages = + {default = pkgs.nixdeploy;} + // (osFilterMap "toplevel") + // (osFilterMap "tarball") + // (osFilterMap "firmware"); legacyPackages = pkgs; devShells = filterPackages system (import ./devShells pkgs); formatter = pkgs.alejandra; -- cgit v1.2.3