krebs buildbot: hostname agnostic

This commit is contained in:
lassulus 2017-07-22 14:50:01 +02:00
parent 899b16848a
commit 0aced47982

View File

@ -6,11 +6,13 @@
# krebs host like wolf and everything should be fine. # krebs host like wolf and everything should be fine.
# TODO for all users schedule a build for fast tests # TODO for all users schedule a build for fast tests
{ let
hostname = config.networking.hostName;
in {
# due to the fact that we actually build stuff on the box via the daemon, # due to the fact that we actually build stuff on the box via the daemon,
# /nix/store should be cleaned up automatically as well # /nix/store should be cleaned up automatically as well
services.nginx.virtualHosts.build = { services.nginx.virtualHosts.build = {
serverAliases = [ "build.wolf.r" ]; serverAliases = [ "build.${hostname}.r" ];
locations."/".extraConfig = '' locations."/".extraConfig = ''
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
@ -22,7 +24,7 @@
nix.gc.dates = "05:23"; nix.gc.dates = "05:23";
networking.firewall.allowedTCPPorts = [ 8010 9989 ]; networking.firewall.allowedTCPPorts = [ 8010 9989 ];
krebs.buildbot.master = let krebs.buildbot.master = let
stockholm-mirror-url = http://cgit.wolf.r/stockholm-mirror ; stockholm-mirror-url = "http://cgit.${hostname}.r/stockholm" ;
in { in {
secrets = [ "retiolum-ci.rsa_key.priv" "cac.json" ]; secrets = [ "retiolum-ci.rsa_key.priv" "cac.json" ];
workers = { workers = {
@ -155,13 +157,13 @@
}; };
irc = { irc = {
enable = true; enable = true;
nick = "wolfbot"; nick = "${hostname}bot";
server = "ni.r"; server = "ni.r";
channels = [ { channel = "retiolum"; } ]; channels = [ { channel = "retiolum"; } ];
allowForce = true; allowForce = true;
}; };
extraConfig = '' extraConfig = ''
c['buildbotURL'] = "http://build.wolf.r/" c['buildbotURL'] = "http://build.${hostname}.r/"
''; '';
}; };
@ -173,6 +175,6 @@
packages = with pkgs; [ gnumake jq nix populate ]; packages = with pkgs; [ gnumake jq nix populate ];
# all nix commands will need a working nixpkgs installation # all nix commands will need a working nixpkgs installation
extraEnviron = { extraEnviron = {
NIX_PATH="nixpkgs=/var/src/nixpkgs:nixos-config=./krebs/1systems/wolf/config.nix:stockholm=./"; }; NIX_PATH="nixpkgs=/var/src/nixpkgs:nixos-config=./krebs/1systems/${hostname}/config.nix:stockholm=./"; };
}; };
} }