From 4d345f467f830b1b435032df8dc85b675364ec19 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Fri, 17 Nov 2023 23:29:18 +0000 Subject: [PATCH] Add devshell and packages to CI --- flake.nix | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 84c03b5..b3271c0 100644 --- a/flake.nix +++ b/flake.nix @@ -165,35 +165,38 @@ lib = pkgs.lib; filterSystem = filterAttrs (_: c: c.config.nixpkgs.system == system); - homes' = + homes = mapAttrs (_: h: h.activationPackage) (filterSystem self.homeConfigurations); - systems' = + systems = mapAttrs (_: h: h.config.system.build.toplevel) (filterSystem self.nixosConfigurations); shell = pkgs.devshell.mkShell ./devshell; in # Stuff for each platform - { + rec { checks = flattenTree { - homeConfigurations = recurseIntoAttrs homes'; + homeConfigurations = recurseIntoAttrs homes; deploy = recurseIntoAttrs (pkgs.deploy-rs.lib.deployChecks self.deploy); }; - ci = - let - homes = - mapAttrs' - (n: v: nameValuePair ''home-${replaceStrings ["@"] ["-at-"] n}'' v) - homes'; - systems = mapAttrs' (n: v: nameValuePair "system-${n}" v) systems'; - in - pkgs.linkFarm "ci" (homes // systems); - packages = flattenTree (import ./pkgs { inherit lib pkgs; }); devShells.default = shell; + + ci = + let + homes' = + mapAttrs' + (n: v: nameValuePair ''home-${replaceStrings ["@"] ["-at-"] n}'' v) + homes; + systems' = mapAttrs' (n: v: nameValuePair "system-${n}" v) systems; + packages' = mapAttrs' (n: v: nameValuePair "package-${n}" v) packages; + in + pkgs.linkFarm "ci" (homes' // systems' // packages' // { + inherit shell; + }); })); }