summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/ci.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-08-31 20:05:05 +0200
committertv <tv@krebsco.de>2017-08-31 20:05:05 +0200
commit30864205c4e07823f93a85fb813196b5096f8692 (patch)
tree6fc13127899a62be53d4e728713939bcbf400448 /krebs/3modules/ci.nix
parenteb2d780e5c4c5aee09153c56ea6150414c1c6db1 (diff)
parentaf0696b9987d3ff0783cdd69d26a903c1ea92004 (diff)
Merge derp
Diffstat (limited to 'krebs/3modules/ci.nix')
-rw-r--r--krebs/3modules/ci.nix50
1 files changed, 9 insertions, 41 deletions
diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix
index b55827e3a..dab87792e 100644
--- a/krebs/3modules/ci.nix
+++ b/krebs/3modules/ci.nix
@@ -17,30 +17,12 @@ in
default = 10;
description = "how long to wait until we test changes (in minutes)";
};
- users = mkOption {
- type = with types; attrsOf (submodule {
- options = {
- all = mkOption {
- type = bool;
- default = false;
- };
- hosts = mkOption {
- type = listOf str;
- default = [];
- };
- };
- });
- example = {
- lass.all = true;
- krebs = {
- all = true;
- hosts = [
- "test-all-krebs-modules"
- "test-arch"
- ];
- };
- };
- default = {};
+ hosts = mkOption {
+ type = types.listOf types.host;
+ default = [];
+ description = ''
+ List of hosts that should be build
+ '';
};
};
@@ -132,23 +114,9 @@ in
timeout=90001
)
- ${let
- user-hosts = mapAttrs (user: a: let
- managed-hosts = attrNames (filterAttrs (_: h: (h.owner.name == user) && h.managed) config.krebs.hosts);
- defined-hosts = a.hosts;
- in
- defined-hosts ++ (optionals a.all managed-hosts)
- ) cfg.users;
-
- in
- concatStringsSep "\n" (
- (mapAttrsToList (user: hosts:
- concatMapStringsSep "\n" (host:
- "build_host(\"${user}\", \"${host}\")"
- ) hosts
- ) user-hosts)
- )
- }
+ ${concatMapStringsSep "\n" (host:
+ "build_host(\"${host.owner.name}\", \"${host.name}\")"
+ ) cfg.hosts}
bu.append(
util.BuilderConfig(