feat: Builder config settable with options

This commit is contained in:
Hunter Halloran
2025-12-17 10:43:43 -05:00
parent 3a95155d49
commit 5fe7c08830
5 changed files with 185 additions and 26 deletions

31
sw/builders/default.nix Normal file
View File

@@ -0,0 +1,31 @@
# ============================================================================
# Builders Software Configuration
# ============================================================================
# Imports builder-specific programs and services (GitHub Actions runners, etc.)
{
config,
lib,
pkgs,
inputs,
...
}:
lib.mkMerge [
(import ./programs.nix {
inherit
config
lib
pkgs
inputs
;
})
(import ./services.nix {
inherit
config
lib
pkgs
inputs
;
})
]

19
sw/builders/programs.nix Normal file
View File

@@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
inputs,
...
}:
with lib;
let
cfg = config.ugaif.sw;
basePackages = with pkgs; [
# Build-related packages can be added here if needed
];
in
{
environment.systemPackages = subtractLists cfg.excludePackages (basePackages ++ cfg.extraPackages);
}

24
sw/builders/services.nix Normal file
View File

@@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.ugaif.sw;
builderCfg = cfg.builders;
in
mkIf builderCfg.githubRunner.enable {
services.github-runners.${builderCfg.githubRunner.name} = {
enable = true;
url = builderCfg.githubRunner.url;
tokenFile = builderCfg.githubRunner.tokenFile;
extraLabels = builderCfg.githubRunner.extraLabels;
user = builderCfg.githubRunner.user;
workDir = builderCfg.githubRunner.workDir;
replace = true;
};
}