Skip to content

Commit aa24515

Browse files
committed
cleanup: organize buildkite files, add a test role
1 parent 43eadfd commit aa24515

File tree

6 files changed

+37
-4
lines changed

6 files changed

+37
-4
lines changed
File renamed without changes.

nix/metal/bitteProfile/buildkite-agent-containers.nix renamed to nix/metal/bitteProfile/buildkite/buildkite-agent-containers.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
in
1313
with lib; {
1414
imports = [
15+
# Common host level config (also applied at guest level)
16+
./common.nix
1517
# GC only from the host to avoid duplicating GC in containers
1618
./auto-gc.nix
1719
# Docker module required in both the host and guest containers
@@ -127,7 +129,10 @@ in
127129

128130
config = {
129131
imports = [
132+
# Common guest level config (also applied at host level)
130133
./common.nix
134+
135+
# Prevent nix sandbox related failures
131136
./nix_nsswitch.nix
132137

133138
# Docker module required in both the host and guest containers
File renamed without changes.

nix/metal/bitteProfile/default.nix

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,38 @@ in {
508508
++ (baseEquinixMachineConfig "equinix-1")
509509
++ buildkiteOnly
510510
++ [
511-
./buildkite-agent-containers.nix
512-
./common.nix
513-
({lib, ...}: {
514-
})
511+
./buildkite/buildkite-agent-containers.nix
512+
(
513+
{
514+
config,
515+
lib,
516+
...
517+
}: let
518+
cfg = config.services.buildkite-containers;
519+
in {
520+
services.auto-gc = {
521+
nixAutoMaxFreedGB = 150;
522+
nixAutoMinFreeGB = 90;
523+
nixHourlyMaxFreedGB = 600;
524+
nixHourlyMinFreeGB = 150;
525+
nixWeeklyGcFull = true;
526+
nixWeeklyGcOnCalendar = "Sat *-*-* 20:00:00";
527+
};
528+
529+
services.buildkite-containers.containerList = let
530+
mkContainer = n: prio: {
531+
containerName = "ci${cfg.hostIdSuffix}-${toString n}";
532+
guestIp = "10.254.1.1${toString n}";
533+
inherit prio;
534+
tags = {
535+
system = "x86_64-linux";
536+
queue = "test";
537+
};
538+
};
539+
in
540+
map (n: mkContainer n (toString (10 - n))) (lib.range 1 5);
541+
}
542+
)
515543
];
516544
};
517545
};

0 commit comments

Comments
 (0)