Skip to content

Commit

Permalink
feat: init buildbot-nix-0 bare config and DNS entry
Browse files Browse the repository at this point in the history
  • Loading branch information
steveej committed Sep 24, 2024
1 parent b5f4dce commit e8aae86
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
config,
inputs,
self,
pkgs,
lib,
...
}: {
imports = [
inputs.disko.nixosModules.disko
inputs.srvos.nixosModules.server
inputs.srvos.nixosModules.hardware-hetzner-online-amd
inputs.srvos.nixosModules.roles-nix-remote-builder
self.nixosModules.holo-users
self.nixosModules.nix-build-distributor

inputs.sops-nix.nixosModules.sops

../../nixos/shared.nix
../../nixos/shared-nix-settings.nix
../../nixos/shared-linux.nix
];

system.stateVersion = "24.05";

passthru = {
hostName = "buildbot-nix-0";
primaryIpv4 = "135.181.114.173";
primaryIpv6 = "2a01:4f9:4b:1a93::1/64";
};

networking.hostName = config.passthru.hostName; # Define your hostname.

hostName = "${config.passthru.hostName}.${(builtins.elemAt (builtins.attrValues self.nixosConfigurations.dweb-reverse-tls-proxy.config.services.bind.zones) 0).name}";

nix.settings.max-jobs = 16;

boot.loader.grub = {
efiSupport = false;
};
# boot.loader.systemd-boot.enable = true;
# boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;

systemd.network.networks."10-uplink".networkConfig.Address = config.passthru.primaryIpv6;

disko.devices = let
disk = id: {
type = "disk";
device = "/dev/${id}";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid0";
};
};
};
};
};
in {
disk = {
sda = disk "nvme0n1";
sdb = disk "nvme1n1";
};
mdadm = {
raid0 = {
type = "mdadm";
level = 0;
content = {
type = "gpt";
partitions = {
primary = {
size = "100%";
content = {
type = "filesystem";
format = "btrfs";
mountpoint = "/";
};
};
};
};
};
};
};

roles.nix-remote-builder.schedulerPublicKeys = [
# TODO
];
}
14 changes: 14 additions & 0 deletions modules/flake-parts/nixosConfigurations.buildbot-nix-0/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
self,
lib,
inputs,
...
}: let
evaluatedSystem = inputs.nixpkgs.lib.nixosSystem {
modules = [./configuration.nix];
system = "x86_64-linux";
specialArgs = self.specialArgs;
};
in {
flake.nixosConfigurations."${evaluatedSystem.config.passthru.hostName}" = evaluatedSystem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ in {
bootstrap-3.${fqdn2domain}. A ${self.nixosConfigurations.turn-3.config.services.kitsune-bootstrap.address}
monitoring-0.${fqdn2domain}. A ${self.nixosConfigurations.monitoring-0.config.passthru.primaryIpv4}
buildbot-nix-0.${fqdn2domain}. A ${self.nixosConfigurations.buildbot-nix-0.config.passthru.primaryIpv4}
'';
};

Expand Down

0 comments on commit e8aae86

Please sign in to comment.