Add devshell and packages to CI
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 16m45s

This commit is contained in:
Jack O'Sullivan 2023-11-17 23:29:18 +00:00
parent 38e7251300
commit 4d345f467f

View File

@ -165,35 +165,38 @@
lib = pkgs.lib; lib = pkgs.lib;
filterSystem = filterAttrs (_: c: c.config.nixpkgs.system == system); filterSystem = filterAttrs (_: c: c.config.nixpkgs.system == system);
homes' = homes =
mapAttrs mapAttrs
(_: h: h.activationPackage) (_: h: h.activationPackage)
(filterSystem self.homeConfigurations); (filterSystem self.homeConfigurations);
systems' = systems =
mapAttrs mapAttrs
(_: h: h.config.system.build.toplevel) (_: h: h.config.system.build.toplevel)
(filterSystem self.nixosConfigurations); (filterSystem self.nixosConfigurations);
shell = pkgs.devshell.mkShell ./devshell; shell = pkgs.devshell.mkShell ./devshell;
in in
# Stuff for each platform # Stuff for each platform
{ rec {
checks = flattenTree { checks = flattenTree {
homeConfigurations = recurseIntoAttrs homes'; homeConfigurations = recurseIntoAttrs homes;
deploy = recurseIntoAttrs (pkgs.deploy-rs.lib.deployChecks self.deploy); 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; }); packages = flattenTree (import ./pkgs { inherit lib pkgs; });
devShells.default = shell; 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;
});
})); }));
} }