stockholm/lass/krops.nix

36 lines
902 B
Nix
Raw Normal View History

2018-09-07 14:59:01 +02:00
{ config ? config, name, target}: let
2018-06-07 08:24:56 +02:00
inherit (import ../krebs/krops.nix { inherit name; })
2018-04-05 19:31:39 +02:00
krebs-source
lib
pkgs
;
source = { test }: lib.evalSource [
krebs-source
{
2018-05-12 15:53:04 +02:00
nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix";
2018-04-05 19:31:39 +02:00
secrets = if test then {
file = "/home/lass/stockholm/lass/2configs/tests/dummy-secrets";
} else {
pass = {
dir = "${lib.getEnv "HOME"}/.password-store";
name = "hosts/${name}";
};
};
}
];
in {
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
2018-06-07 08:24:56 +02:00
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
2018-04-05 19:31:39 +02:00
source = source { test = false; };
2018-09-07 14:59:01 +02:00
inherit target;
2018-04-05 19:31:39 +02:00
};
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test)
2018-09-07 14:59:01 +02:00
ci = pkgs.krops.writeTest "${name}-test" {
2018-04-05 19:31:39 +02:00
source = source { test = true; };
2018-09-07 14:59:01 +02:00
inherit target;
2018-04-05 19:31:39 +02:00
};
}