This commit is contained in:
ari committed 2026-11-01 14:26:16 -05:00
1 parent a12f10d964
commit dd4965f030
8 files changed
+784 -19

No files matched your search

+15 -3
View File
@@ -1,11 +1,16 @@
{ config, lib, pkgs, slackerbot, skyg-secrets, ... }:
{ config, lib, pkgs, skyg-secrets, ... }:
let
ports = { cluster = 7946; };
homes = "/data/slackerbot";
secrets = [ "slackerbot-slack" "slackerbot-goose" "slackerbot-cluster" ];
bazel = config.skyg.nixos.server.services.bazel-build;
settings = {
# The system each container boots; updated on every rebuild.
system = "${slackerbot.packages.${pkgs.stdenv.hostPlatform.system}.agent}";
# The system each container boots (slackerbot's agent + bazel/rbuild);
# updated on every rebuild.
system = "${bazel.agentSystem}";
# /handoff and /outputs for remote Bazel builds on this host.
rw_binds = bazel.binds.rw;
ro_binds = bazel.binds.ro;
machines_dir = "/var/lib/machines";
state_dir = "/var/lib/slackerbot";
agent_cwd = "/root";
@@ -56,6 +61,13 @@ in
clusterPort = ports.cluster;
configFile = (pkgs.formats.toml { }).generate "slackerbot.toml" settings;
};
# Bazel build server for the containers (16 cores / 32 threads).
skyg.nixos.server.services.bazel-build = {
enable = true;
cpuCount = 32;
cacheGB = 200;
};
# The module takes one env file; these add to it.
systemd.services.slackerbot.serviceConfig.EnvironmentFile =
map (name: config.age.secrets.${name}.path) secrets;
+15 -3
View File
@@ -1,9 +1,14 @@
{ config, pkgs, slackerbot, skyg-secrets, ... }:
{ config, pkgs, skyg-secrets, ... }:
let
homes = "/var/lib/slackerbot/homes";
bazel = config.skyg.nixos.server.services.bazel-build;
settings = {
# The system each container boots; updated on every rebuild.
system = "${slackerbot.packages.${pkgs.stdenv.hostPlatform.system}.agent}";
# The system each container boots (slackerbot's agent + bazel/rbuild);
# updated on every rebuild.
system = "${bazel.agentSystem}";
# /handoff and /outputs for remote Bazel builds on this host.
rw_binds = bazel.binds.rw;
ro_binds = bazel.binds.ro;
machines_dir = "/var/lib/machines";
state_dir = "/var/lib/slackerbot";
agent_cwd = "/root";
@@ -43,6 +48,13 @@ in
environmentFile = config.age.secrets.slackerbot-cluster.path;
};
# Bazel build server for the containers (4 cores / 8 threads).
skyg.nixos.server.services.bazel-build = {
enable = true;
cpuCount = 8;
cacheGB = 50;
};
# Container links belong to systemd-networkd.
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
networking.dhcpcd.denyInterfaces = [ "ve-*" ];