summaryrefslogtreecommitdiffstats
path: root/tv/krops.nix
blob: 3b60d3208d548e2b9a90bab7de9be58fc8e197d5 (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
{ name }: rec {

  inherit (import ../krebs/krops.nix { inherit name; })
    krebs-nixpkgs
    krebs-source
    lib
    pkgs
  ;

  source = lib.evalSource [
    (krebs-nixpkgs { test = true; })
    krebs-source
    {
      nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix";
      secrets.file = toString ./dummy_secrets;
    }
  ];

  # usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A test)
  test = { target }: pkgs.krops.writeTest "tv-krops-${name}-ci" {
    force = true;
    inherit source target;
  };

}