Skip to main content

NixOS Module

The NixOS module services.iglu-cache is the easiest way to deploy the Iglu-Cache on NixOS. The definition can be found here.

services.iglu-cache.​

OptionDefaultTypeDescription
enablefalseboolIglu-cache service.
packagepkgs.iglu-cachepackageThe Iglu cache package to runs.
user"iglu"strUser account under which iglu-cache runs.
group"iglu"strGroup under which iglu-cache runs.
dataDir"/var/lib/iglu-cache"strPath where derivations are stored.
openFirewallfalseboolOpen ports in the firewall for the iglu-cache.

services.iglu-cache.database.​

This options configure the database. It creates a postgresql instance if you set services.iglu-cache.database.type = "postgres"; and services.iglu-cache.database.createLocally = true;. Additionally are the database settings in the config.toml set by this config.

host, port, user, passwordFile only matter for postgres. createLocally requires type = "postgres".

OptionDefaultTypeDescription
type"sqlite"enum: sqlite, postgresWhich database type is used.
createLocallyfalseboolCreate the database and database user locally.
name"iglu"strDatabase name.
usercfg.userstrDatabase user.
passwordFilenullnullOr strFull path to a file containing the database password.
host"/var/run/postgresql"strHost where the database is stored.
port5432portPort of the database connection.

services.iglu-cache.settings.server.​

OptionDefaultTypeDescription
hostname"http://127.0.0.1:8080"strPublic hostname which the client will access.
interface"127.0.0.1"strInterface the cache listens on.
port8080portPort the cache listens on.
hashing_secret_file""strPath to the file containing the hashing secret.
enable_resttrueboolEnable rest configuration endpoint.
enable_infotrueboolEnable an info page for each tenant.

services.iglu-cache.settings.server.encryption​

OptionDefaultTypeDescription
secret_file"${cfg.dataDir}/secret.key"strA path to a file where an encryption secret can be stored. This file may or may not exist (if it doesn't Iglu will create it and generate a random secret for you)

services.iglu-cache.settings.storage.​

danger

S3 settings are not implemented yet!

OptionDefaultTypeDescription
storage_type"fs"enum: fs, s3fs for filesystem, s3 for an S3 instance.
binary_storage_directory"${cfg.dataDir}/data"strData location when fs is used.

services.iglu-cache.settings.logger.​

OptionDefaultTypeDescription
logging_format"pretty"enum: pretty, jsonPrint the log pretty or as json.
logging_prefix"cache"strPrefix before each log entry.
logging_prefix_color"magenta"enum: magenta, black, red, green, yellow, blue, cyan, whiteColor of the prefix before each log entry.
log_level"info"enum: debug, info, warn, errorLog level of the logger.
should_log_requestsfalseboolLog all requests.

services.iglu-cache.settings.tenants.​

OptionDefaultTypeDescription
definitions[ ]listOf submoduleDefinitions of tenants.

services.iglu-cache.settings.tenants.definitions.*​

OptionDefaultTypeDescription
name"default"strName of the tenant.
github_username""strThe GitHub username of the cache.
is_publicfalseboolMake this cache public.
preferred_compression_method"zstd"enum: zstd, xzDefault compression method.
priority1ints.positivePriority of the cache.
api_key_id"generated"strSet an api_key_id or generate one with "generated".
ttl"5w"strHow long the derivations live.
signing_method"client"enum: client, serverSets how the Iglu tenant should behave when signing or verifying derivation signatures. We recommend setting this to "server" to let Iglu sign derivations (some features are not available in client signing mode). You can read more about signing and the two options here

services.iglu-cache.settings.deployments.​

OptionDefaultTypeDescription
enable_deploymentscfg.settings.deployments.definitions != [ ]boolEnable deployment endpoints.
definitions[ ]listOf submoduleDefinitions of deployment endpoints.

services.iglu-cache.settings.deployments.definitions.*​

OptionDefaultTypeDescription
name""strName of the deployment.
type"agent"enum: agent, activateagent or activate (activation token).
expires_at"-1"strISO format (e.g. 2026-05-02T14:30:00Z) or "-1" for no expiry.
tenant_name"default"strName of the tenant to use.