summaryrefslogtreecommitdiffstats
path: root/ci.nix
blob: 1aecc8e70a34bf984f583d1f01794228dc102a43 (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
# usage: nix-instantiate --eval --json --read-write-mode --strict ci.nix | jq .
let
  lib = pkgs.lib;
  pkgs = import <nixpkgs> { overlays = [ (import ./submodules/nix-writers/pkgs) ]; };
  system =
    import <nixpkgs/nixos/lib/eval-config.nix> {
      modules = [{
        imports = [
          ./krebs
          ./krebs/2configs
          ({ config, ... }: {
            krebs.build.host = config.krebs.hosts.test-all-krebs-modules;
          })
        ];
      }];
    }
  ;

  ci-systems = lib.filterAttrs (_: v: v.ci) system.config.krebs.hosts;

  build = host: owner:
  ((import (toString ./. + "/${owner}/krops.nix") { name = host; }).test {target = "${builtins.getEnv "HOME"}/stockholm-build";});

in lib.mapAttrs (n: h: build n h.owner.name) ci-systems