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:
parent
b2cb5fd7ff
commit
3d91319498
7 changed files with 48 additions and 0 deletions
35
hosts/best/hercules/default.nix
Normal file
35
hosts/best/hercules/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue