2024-10-19 01:19:59 -05:00
|
|
|
{
|
2025-12-06 23:17:00 -06:00
|
|
|
config,
|
2025-12-28 21:18:13 -06:00
|
|
|
metadata,
|
2025-12-06 23:17:00 -06:00
|
|
|
pkgs,
|
2025-04-13 21:04:59 -05:00
|
|
|
top,
|
2024-10-19 01:19:59 -05:00
|
|
|
...
|
|
|
|
|
}:
|
2024-04-16 08:34:06 -05:00
|
|
|
|
2025-12-03 20:38:00 -06:00
|
|
|
let
|
2025-12-28 21:18:13 -06:00
|
|
|
ip = metadata.hosts.${config.networking.hostName}.ip;
|
2025-12-07 00:06:38 -06:00
|
|
|
mk = file: {
|
|
|
|
|
inherit file;
|
|
|
|
|
owner = "buildbot";
|
|
|
|
|
group = "buildbot";
|
|
|
|
|
};
|
2025-12-03 20:38:00 -06:00
|
|
|
in
|
2024-04-16 08:34:06 -05:00
|
|
|
{
|
2024-10-19 01:19:59 -05:00
|
|
|
imports = [
|
|
|
|
|
./hardware-configuration.nix
|
2025-12-06 23:17:00 -06:00
|
|
|
top.buildbot.nixosModules.buildbot-master
|
|
|
|
|
top.buildbot.nixosModules.buildbot-worker
|
2024-10-19 01:19:59 -05:00
|
|
|
];
|
2024-04-16 08:34:06 -05:00
|
|
|
|
2025-12-06 23:17:00 -06:00
|
|
|
age.secrets = {
|
2026-02-19 08:06:54 -06:00
|
|
|
runner-reg.file = ../../../secrets/gitlab/nixos-qemu-shell.age;
|
2025-12-29 01:50:06 -06:00
|
|
|
|
2026-02-19 08:06:54 -06:00
|
|
|
gitea-buildbotWorkersFile = mk ../../../secrets/gitea/buildbotWorkersFile.age;
|
|
|
|
|
gitea-oauthToken = mk ../../../secrets/gitea/oauthToken.age;
|
|
|
|
|
gitea-oauthSecret = mk ../../../secrets/gitea/oauthSecret.age;
|
|
|
|
|
gitea-webhookSecret = mk ../../../secrets/gitea/webhookSecret.age;
|
|
|
|
|
gitea-workerPassword = mk ../../../secrets/gitea/workerPassword.age;
|
2025-12-06 23:17:00 -06:00
|
|
|
};
|
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
# Bootloader.
|
2025-04-17 22:15:01 -05:00
|
|
|
boot = {
|
|
|
|
|
initrd.kernelModules = [
|
2025-11-08 13:59:34 -06:00
|
|
|
"amdgpu"
|
2025-04-17 22:15:01 -05:00
|
|
|
];
|
2025-12-06 23:17:00 -06:00
|
|
|
kernelParams = [
|
|
|
|
|
];
|
2025-04-17 22:15:01 -05:00
|
|
|
loader = {
|
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
};
|
2024-11-20 22:53:37 -06:00
|
|
|
};
|
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
environment.systemPackages = with pkgs; [
|
2025-11-08 13:59:34 -06:00
|
|
|
amdgpu_top
|
|
|
|
|
clinfo
|
2024-10-03 11:26:39 -05:00
|
|
|
curl
|
|
|
|
|
gawk
|
|
|
|
|
git
|
2025-11-08 16:11:37 -06:00
|
|
|
mesa-demos
|
2024-10-03 11:26:39 -05:00
|
|
|
unzip
|
|
|
|
|
wget
|
|
|
|
|
];
|
2024-06-21 13:02:13 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
fileSystems = {
|
|
|
|
|
"/nix" = {
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=nix" ];
|
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
|
};
|
|
|
|
|
"/var" = {
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=var" ];
|
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
|
};
|
2025-04-17 16:52:11 -05:00
|
|
|
"/var/pve" = {
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=pve" ];
|
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
|
};
|
|
|
|
|
"/btrfs" = {
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
2024-06-21 13:02:13 -05:00
|
|
|
|
2025-01-16 15:20:25 -06:00
|
|
|
greg = {
|
|
|
|
|
home = true;
|
2025-07-02 23:07:08 -05:00
|
|
|
kubernetes = {
|
|
|
|
|
enable = true;
|
|
|
|
|
vipInterface = "br0";
|
2025-12-03 20:38:00 -06:00
|
|
|
vip = ip;
|
2025-07-02 23:07:08 -05:00
|
|
|
priority = 254;
|
|
|
|
|
};
|
2026-03-28 23:24:52 -05:00
|
|
|
nebula = {
|
|
|
|
|
enable = true;
|
|
|
|
|
unsafeRoutes = [
|
|
|
|
|
{
|
|
|
|
|
route = "10.42.0.0/16";
|
|
|
|
|
via = "10.157.0.2"; # genesis
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2025-11-15 14:08:34 -06:00
|
|
|
tailscale = {
|
|
|
|
|
enable = true;
|
|
|
|
|
tags = [ "home" ];
|
|
|
|
|
};
|
2025-01-16 15:20:25 -06:00
|
|
|
remote-builder.enable = true;
|
2025-07-29 23:13:10 -05:00
|
|
|
runner = {
|
|
|
|
|
enable = true;
|
|
|
|
|
threads = 3;
|
2025-11-02 22:33:05 -06:00
|
|
|
qemu = true;
|
2025-07-29 23:13:10 -05:00
|
|
|
};
|
2025-01-16 15:20:25 -06:00
|
|
|
};
|
|
|
|
|
|
2025-12-25 22:54:13 -06:00
|
|
|
hardware = {
|
|
|
|
|
graphics = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enable32Bit = true;
|
|
|
|
|
};
|
2025-11-08 13:59:34 -06:00
|
|
|
};
|
|
|
|
|
|
2025-01-16 15:20:25 -06:00
|
|
|
networking = {
|
|
|
|
|
hostName = "jeremiah"; # Define your hostname.
|
|
|
|
|
useDHCP = false;
|
2025-04-13 21:04:59 -05:00
|
|
|
bridges.br0 = {
|
|
|
|
|
interfaces = [ "enp68s0" ];
|
|
|
|
|
};
|
2025-01-16 15:20:25 -06:00
|
|
|
defaultGateway = {
|
2025-12-28 21:18:13 -06:00
|
|
|
address = metadata.infra.gw;
|
2025-04-13 21:04:59 -05:00
|
|
|
interface = "br0";
|
2025-01-16 15:20:25 -06:00
|
|
|
};
|
2025-12-16 08:14:25 -06:00
|
|
|
firewall.allowedTCPPorts = [
|
|
|
|
|
3389
|
|
|
|
|
9989 # buildbot communications port
|
|
|
|
|
];
|
2025-12-03 20:38:00 -06:00
|
|
|
interfaces.br0.ipv4 = {
|
|
|
|
|
addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = ip;
|
|
|
|
|
prefixLength = 16;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2025-12-28 21:18:13 -06:00
|
|
|
nameservers = [ metadata.infra.dns ];
|
2025-01-16 15:20:25 -06:00
|
|
|
};
|
|
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
services = {
|
2025-12-06 23:17:00 -06:00
|
|
|
buildbot-nix = {
|
|
|
|
|
master = {
|
|
|
|
|
enable = true;
|
|
|
|
|
admins = [ "greg" ];
|
|
|
|
|
authBackend = "gitea";
|
|
|
|
|
# Optional to build non-default branches at a time
|
2025-12-07 15:41:10 -06:00
|
|
|
branches = {
|
|
|
|
|
default = {
|
|
|
|
|
matchGlob = "ma*";
|
|
|
|
|
registerGCRoots = false;
|
|
|
|
|
updateOutputs = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-12-06 23:17:00 -06:00
|
|
|
domain = "${config.networking.hostName}.shire-zebra.ts.net:8010";
|
2025-12-10 08:22:21 -06:00
|
|
|
evalMaxMemorySize = 8192;
|
2026-02-27 13:44:12 -06:00
|
|
|
evalWorkerCount = 4;
|
2025-12-06 23:17:00 -06:00
|
|
|
gitea = {
|
|
|
|
|
enable = true;
|
|
|
|
|
instanceUrl = "https://src.thehellings.com";
|
2025-12-29 01:50:06 -06:00
|
|
|
oauthId = "7ec9107d-379b-47c8-870f-1191956d0500";
|
2025-12-06 23:17:00 -06:00
|
|
|
oauthSecretFile = config.age.secrets.gitea-oauthSecret.path;
|
|
|
|
|
tokenFile = config.age.secrets.gitea-oauthToken.path;
|
2025-12-29 01:50:06 -06:00
|
|
|
topic = "buildbot-nix";
|
2025-12-06 23:17:00 -06:00
|
|
|
webhookSecretFile = config.age.secrets.gitea-webhookSecret.path;
|
|
|
|
|
};
|
2025-12-07 00:06:38 -06:00
|
|
|
showTrace = true;
|
|
|
|
|
#webhookBaseUrl = "http://${config.networking.hostName}.shire-zebra.ts.net:8010";
|
2025-12-06 23:17:00 -06:00
|
|
|
workersFile = config.age.secrets.gitea-buildbotWorkersFile.path;
|
|
|
|
|
};
|
|
|
|
|
worker = {
|
|
|
|
|
enable = true;
|
|
|
|
|
workerPasswordFile = config.age.secrets.gitea-workerPassword.path;
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
2024-04-16 08:34:06 -05:00
|
|
|
}
|