1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-08-01 04:27:46 +00:00

feat: add Hercules ci

This commit is contained in:
RGBCube 2025-02-26 00:35:06 +03:00
parent b2cb5fd7ff
commit 3d91319498
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
7 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,35 @@
{ config, lib, ... }: let
inherit (lib) enabled genAttrs;
in {
secrets.awsCredentials = {
file = ./credentials.age;
owner = "hercules-ci-agent";
};
secrets.herculesCaches = {
file = ./caches.age;
owner = "hercules-ci-agent";
};
secrets.herculesToken = {
file = ./token.age;
owner = "hercules-ci-agent";
};
secrets.herculesSecrets = {
file = ./secrets.age;
owner = "hercules-ci-agent";
};
home-manager.users = genAttrs [ "hercules-ci-agent" "root" ] (_: homeArgs: let
homeLib = homeArgs.config.lib;
in {
home.file.".aws/credentials".source = homeLib.file.mkOutOfStoreSymlink config.secrets.awsCredentials.path;
});
services.hercules-ci-agent = enabled {
settings = {
binaryCachesPath = config.secrets.herculesCaches.path;
clusterJoinTokenPath = config.secrets.herculesToken.path;
secretsJsonPath = config.secrets.herculesSecrets.path;
};
};
}