summaryrefslogtreecommitdiff
path: root/repo/ci.nix
blob: 05fd106e4f9de5cd13837554a30d9fc284f3f73b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{self, ...}: {
  perSystem = {
    lib,
    pkgs,
    system,
    self',
    ...
  }: let
    ci = self.lib.ci [system];

    configurations = map (type: ci.mapCfgsToDerivs (ci.getCompatibleCfgs self.${type})) [
      "nixosConfigurations"
      "darwinConfigurations"
      "homeConfigurations"
    ];

    required = lib.concatMap lib.attrValues (
      [
        self'.checks
        self'.devShells
      ]
      ++ configurations
    );
  in {
    packages.ciGate = pkgs.writeText "ci-gate" (
      lib.concatMapStringsSep "\n" toString required
    );
  };
}