summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-06-27 22:57:34 +0200
committertv <tv@krebsco.de>2017-06-27 22:57:34 +0200
commit954996f78fbd65f89d2e768d09e2bcc41c080d17 (patch)
tree8179e5730f2c10e094c217aa9070356d367fb59f /tv/2configs
parent4fc9f53f7a44a52fafc4ba7e7d3bf8e3dd865dd5 (diff)
tv: configure stockholm for buildbot
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/default.nix22
1 files changed, 13 insertions, 9 deletions
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index d248bf578..5d61cb941 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -1,20 +1,24 @@
-{ config, lib, pkgs, ... }:
-
with import <stockholm/lib>;
-
-{
+{ config, lib, pkgs, ... }: let
+ builder = if getEnv "dummy_secrets" == "true"
+ then "buildbot"
+ else "tv";
+in {
krebs.enable = true;
krebs.build = {
user = config.krebs.users.tv;
source = let inherit (config.krebs.build) host; in {
nixos-config.symlink = "stockholm/tv/1systems/${host.name}.nix";
- secrets.file =
- if getEnv "dummy_secrets" == "true"
- then toString <stockholm/tv/dummy_secrets>
- else "/home/tv/secrets/${host.name}";
+ secrets.file = getAttr builder {
+ buildbot = toString <stockholm/tv/dummy_secrets>;
+ tv = "/home/tv/secrets/${host.name}";
+ };
secrets-common.file = "/home/tv/secrets/common";
- stockholm.file = "/home/tv/stockholm";
+ stockholm.file = getAttr builder {
+ buildbot = getEnv "PWD";
+ tv = "/home/tv/stockholm";
+ };
nixpkgs.git = {
url = https://github.com/NixOS/nixpkgs;
ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03