···
3
-
This file is for options that NixOS and nix-darwin have in common.
3
+
This file is for options that NixOS and nix-darwin have in common.
5
-
Platform-specific code is in the respective default.nix files.
5
+
Platform-specific code is in the respective default.nix files.
{ config, lib, options, pkgs, ... }:
···
settingsModule = { config, ... }: {
freeformType = format.type;
30
+
apiBaseUrl = mkOption {
32
+
API base URL that the agent will connect to.
34
+
When using Hercules CI Enterprise, set this to the URL where your
35
+
Hercules CI server is reachable.
38
+
default = "https://hercules-ci.com";
baseDirectory = mkOption {
default = "/var/lib/hercules-ci-agent";
···
type = types.either types.ints.positive (types.enum [ "auto" ]);
70
+
A key-value map of user data.
72
+
This data will be available to organization members in the dashboard and API.
74
+
The values can be of any TOML type that corresponds to a JSON type, but arrays
75
+
can not contain tables/objects due to limitations of the TOML library. Values
76
+
involving arrays of non-primitive types may not be representable currently.
79
+
defaultText = literalExpression ''
81
+
agent.source = "..."; # One of "nixpkgs", "flake", "override"
82
+
lib.version = "...";
83
+
pkgs.version = "...";
workDirectory = mkOption {
The directory in which temporary subdirectories are created for task state. This includes sources for Nix evaluation.
···
staticSecretsDirectory = mkOption {
This is the default directory to look for statically configured secrets like <literal>cluster-join-token.key</literal>.
99
+
See also <literal>clusterJoinTokenPath</literal> and <literal>binaryCachesPath</literal> for fine-grained configuration.
default = config.baseDirectory + "/secrets";
···
clusterJoinTokenPath = mkOption {
Location of the cluster-join-token.key file.
109
+
You can retrieve the contents of the file when creating a new agent via
110
+
<link xlink:href="https://hercules-ci.com/dashboard">https://hercules-ci.com/dashboard</link>.
112
+
As this value is confidential, it should not be in the store, but
113
+
installed using other means, such as agenix, NixOps
114
+
<literal>deployment.keys</literal>, or manual installation.
116
+
The contents of the file are used for authentication between the agent and the API.
default = config.staticSecretsDirectory + "/cluster-join-token.key";
defaultText = literalExpression ''staticSecretsDirectory + "/cluster-join-token.key"'';
81
-
# internal: It's a bit too detailed to show by default in the docs,
82
-
# but useful to define explicitly to allow reuse by other modules.
binaryCachesPath = mkOption {
87
-
Location of the binary-caches.json file.
124
+
Path to a JSON file containing binary cache secret keys.
126
+
As these values are confidential, they should not be in the store, but
127
+
copied over using other means, such as agenix, NixOps
128
+
<literal>deployment.keys</literal>, or manual installation.
130
+
The format is described on <link xlink:href="https://docs.hercules-ci.com/hercules-ci-agent/binary-caches-json/">https://docs.hercules-ci.com/hercules-ci-agent/binary-caches-json/</link>.
default = config.staticSecretsDirectory + "/binary-caches.json";
defaultText = literalExpression ''staticSecretsDirectory + "/binary-caches.json"'';
92
-
# internal: It's a bit too detailed to show by default in the docs,
93
-
# but useful to define explicitly to allow reuse by other modules.
136
+
secretsJsonPath = mkOption {
138
+
Path to a JSON file containing secrets for effects.
140
+
As these values are confidential, they should not be in the store, but
141
+
copied over using other means, such as agenix, NixOps
142
+
<literal>deployment.keys</literal>, or manual installation.
144
+
The format is described on <link xlink:href="https://docs.hercules-ci.com/hercules-ci-agent/secrets-json/">https://docs.hercules-ci.com/hercules-ci-agent/secrets-json/</link>.
148
+
default = config.staticSecretsDirectory + "/secrets.json";
149
+
defaultText = literalExpression ''staticSecretsDirectory + "/secrets.json"'';
···
These are written as options instead of let binding to allow sharing with
default.nix on both NixOS and nix-darwin.