summaryrefslogtreecommitdiff
path: root/dev/ci.nix
blob: 2d5f58368006ef62f18a611defe9d232d76e8591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  lib,
  self,
  ...
}: {
  flake.hydraJobs = let
    ciSystems = ["x86_64-linux"];

    getOutputs = lib.getAttrs ciSystems;

    mapCfgsToDerivs = lib.mapAttrs (_: cfg: cfg.activationPackage or cfg.config.system.build.toplevel);
    getCompatibleCfgs = lib.filterAttrs (_: cfg: lib.elem cfg.pkgs.system ciSystems);
    getConfigurations = type: mapCfgsToDerivs (getCompatibleCfgs self."${type}Configurations");
  in
    {
      checks = getOutputs self.checks;
      devShells = getOutputs self.devShells;
    }
    // lib.genAttrs ["nixos" "home"] getConfigurations;
}