Athens
services.athens.basicAuthPass
Password for basic auth. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Example
"swordfish"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.basicAuthUser
Username for basic auth.
Type: null or string
Default
null
Example
"user"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.cloudRuntime
Specifies the Cloud Provider on which the Proxy/registry is running.
Type: one of "GCP", "none"
Default
"none"
Example
"GCP"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.downloadMode
Defines how Athens behaves when a module@version
is not found in storage. There are 7 options:
1. "sync": download the module synchronously and
return the results to the client.
2. "async": return 404, but asynchronously store the module
in the storage backend.
3. "redirect": return a 301 redirect status to the client
with the base URL as the DownloadRedirectURL from below.
4. "async_redirect": same as option number 3 but it will
asynchronously store the module to the backend.
5. "none": return 404 if a module is not found and do nothing.
6. "file:
Type: one of "sync", "async", "redirect", "async_redirect", "none" or string matching the pattern ^file:.*$|^custom:.*$
Default
"async_redirect"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.downloadURL
URL used if DownloadMode is set to redirect.
Type: string
Default
"https://proxy.golang.org"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.enable
Whether to enable Go module datastore and proxy.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.enablePprof
Enable pprof endpoints.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.extraConfig
Extra configuration options for the athens config file.
Type: attribute set
Default
{ }
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.filterFile
Filename for the include exclude filter.
Type: null or path
Default
null
Example
pkgs.writeText "filterFile" '' - github.com/azure + github.com/azure/azure-sdk-for-go D golang.org/x/tools''
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.forceSSL
Force SSL redirects for incoming requests.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.githubToken
Creates .netrc file with the given token to be used for GitHub. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Example
"ghp_1234567890"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.globalEndpoint
Endpoint for a package registry in case of a proxy cache miss.
Type: string
Default
""
Example
"http://upstream-athens.example.com:3000"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.goBinary
The Go package used by Athens at runtime.
Athens primarily runs two Go commands:
1. go mod download -json <module>@<version>
2. go list -m -json <module>@latest
Type: package
Default
pkgs.go
Example
"pkgs.go_1_21"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.goBinaryEnvVars
Environment variables to pass to the Go binary.
Type: attribute set
Default
{ }
Example
'' { "GOPROXY" = "direct", "GODEBUG" = "true" }''
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.goEnv
Specifies the type of environment to run. One of 'development' or 'production'.
Type: one of "development", "production"
Default
"development"
Example
"production"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.goGetDir
Temporary directory that Athens will use to fetch modules from VCS prior to persisting them to a storage backend.
If the value is empty, Athens will use the default OS temp directory.
Type: null or path
Default
null
Example
"/tmp/athens"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.goGetWorkers
Number of workers concurrently downloading modules.
Type: signed integer
Default
10
Example
32
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.hgrcPath
Path to the .hgrc file.
Type: null or path
Default
null
Example
"/home/user/.hgrc"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.database
Database name for the MySQL database.
Type: string
Default
"athens"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.host
Host for the MySQL database.
Type: string
Default
"localhost"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.params.parseTime
Parse time for the MySQL database.
Type: null or string
Default
"true"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.params.timeout
Timeout for the MySQL database.
Type: null or string
Default
"30s"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.password
Password for the MySQL database. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.port
Port for the MySQL database.
Type: signed integer
Default
3306
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.protocol
Protocol for the MySQL database.
Type: string
Default
"tcp"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.mysql.user
User for the MySQL database.
Type: string
Default
"root"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.postgres.database
Database name for the Postgres database.
Type: string
Default
"athens"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.postgres.host
Host for the Postgres database.
Type: string
Default
"localhost"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.postgres.params.connect_timeout
Connect timeout for the Postgres database.
Type: null or string
Default
"30s"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.postgres.params.sslmode
SSL mode for the Postgres database.
Type: null or string
Default
"disable"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.postgres.password
Password for the Postgres database. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.postgres.port
Port for the Postgres database.
Type: signed integer
Default
5432
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.index.postgres.user
User for the Postgres database.
Type: string
Default
"postgres"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.indexType
Type of index backend Athens will use.
Type: one of "none", "memory", "mysql", "postgres"
Default
"none"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.logLevel
Log level for Athens. Supports all logrus log levels (https://github.com/Sirupsen/logrus#level-logging)".
Type: null or one of "panic", "fatal", "error", "warning", "info", "debug", "trace"
Default
"warning"
Example
"debug"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.netrcPath
Path to the .netrc file.
Type: null or path
Default
null
Example
"/home/user/.netrc"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.networkMode
Configures how Athens will return the results of the /list endpoint as it can be assembled from both its own storage and the upstream VCS.
Note, that for better error messaging, this would also affect how other endpoints behave.
Modes: 1. strict: merge VCS versions with storage versions, but fail if either of them fails. 2. offline: only get storage versions, never reach out to VCS. 3. fallback: only return storage versions, if VCS fails. Note this means that you may see inconsistent results since fallback mode does a best effort of giving you what's available at the time of requesting versions.
Type: one of "strict", "offline", "fallback"
Default
"strict"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.noSumPatterns
List of patterns that Athens sum db proxy will return a 403 for.
Type: list of string
Default
[ ]
Example
["github.com/mycompany/*"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.package
Which athens derivation to use
Type: package
Default
pkgs.athens
Example
"pkgs.athens"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.pathPrefix
Sets basepath for all routes.
Type: null or string
Default
null
Example
"/athens"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.port
Port number Athens listens on.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
3000
Example
443
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.pprofPort
Port number for pprof endpoints.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
3301
Example
443
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.protocolWorkers
Number of workers concurrently serving protocol paths.
Type: signed integer
Default
30
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.robotsFile
Provides /robots.txt for net crawlers.
Type: null or path
Default
null
Example
pkgs.writeText "robots.txt" "# my custom robots.txt ..."
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.shutdownTimeout
Number of seconds to wait for the server to shutdown gracefully.
Type: signed integer
Default
60
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.etcd.endpoints
URLs that determine all distributed etcd servers.
Type: list of string
Default
[ ]
Example
["localhost:2379"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redis.endpoint
URL of the redis server.
Type: string
Default
""
Example
"localhost:6379"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redis.lockConfig.maxRetries
Maximum number of retries for the lock.
Type: signed integer
Default
10
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redis.lockConfig.timeout
Timeout for the lock in seconds.
Type: signed integer
Default
15
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redis.lockConfig.ttl
TTL for the lock in seconds.
Type: signed integer
Default
900
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redis.password
Password for the redis server. Warning: this is stored in plain text in the config file.
Type: string
Default
""
Example
"swordfish"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redisSentinel.endpoints
URLs that determine all distributed redis servers.
Type: list of string
Default
[ ]
Example
["localhost:26379"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redisSentinel.lockConfig.maxRetries
Maximum number of retries for the lock.
Type: signed integer
Default
10
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redisSentinel.lockConfig.timeout
Timeout for the lock in seconds.
Type: signed integer
Default
15
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redisSentinel.lockConfig.ttl
TTL for the lock in seconds.
Type: signed integer
Default
900
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redisSentinel.masterName
Name of the sentinel master server.
Type: string
Default
""
Example
"redis-1"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlight.redisSentinel.sentinelPassword
Password for the sentinel server. Warning: this is stored in plain text in the config file.
Type: string
Default
""
Example
"swordfish"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.singleFlightType
Determines what mechanism Athens uses to manage concurrency flowing into the Athens backend.
Type: one of "memory", "etcd", "redis", "redis-sentinel", "gcp", "azureblob"
Default
"memory"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.statsExporter
Stats exporter to use.
Type: null or value "prometheus" (singular enum)
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.azureblob.accountKey
Account key for the Azure Blob storage backend. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.azureblob.accountName
Account name for the Azure Blob storage backend.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.azureblob.containerName
Container name for the Azure Blob storage backend.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.cdn.endpoint
hostname of the CDN server.
Type: null or string
Default
null
Example
"cdn.example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.disk.rootPath
Athens disk root folder.
Type: null or path
Default
"/var/lib/athens"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.external.url
URL of the backend storage layer.
Type: null or string
Default
null
Example
"https://athens.example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.gcp.bucket
GCP backend storage bucket.
Type: null or string
Default
null
Example
"my-bucket"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.gcp.jsonKey
Base64 encoded GCP service account key. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.gcp.projectID
GCP project ID.
Type: null or string
Default
null
Example
"my-project"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.minio.bucket
Bucket name for the minio storage backend.
Type: null or string
Default
null
Example
"gomods"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.minio.enableSSL
Enable SSL for the minio storage backend.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.minio.endpoint
Endpoint of the minio storage backend.
Type: null or string
Default
null
Example
"minio.example.com:9001"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.minio.key
Access key id for the minio storage backend.
Type: null or string
Default
null
Example
"minio"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.minio.region
Region for the minio storage backend.
Type: null or string
Default
null
Example
"us-east-1"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.minio.secret
Secret key for the minio storage backend. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Example
"minio123"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.mongo.certPath
Path to the certificate file for the mongo database.
Type: null or path
Default
null
Example
"/etc/ssl/mongo.pem"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.mongo.defaultDBName
Name of the mongo database.
Type: null or string
Default
null
Example
"athens"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.mongo.insecure
Allow insecure connections to the mongo database.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.mongo.url
URL of the mongo database.
Type: null or string
Default
null
Example
"mongodb://localhost:27017"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.awsContainerCredentialsRelativeURI
Container relative url (used by fargate).
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.bucket
Bucket name for the S3 storage backend.
Type: null or string
Default
null
Example
"gomods"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.credentialsEndpoint
Credentials endpoint for the S3 storage backend.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.endpoint
Endpoint for the S3 storage backend.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.forcePathStyle
Force path style for the S3 storage backend.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.key
Access key id for the S3 storage backend.
Type: null or string
Default
null
Example
"minio"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.region
Region of the S3 storage backend.
Type: null or string
Default
null
Example
"eu-west-3"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.secret
Secret key for the S3 storage backend. Warning: this is stored in plain text in the config file.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.token
Token for the S3 storage backend. Warning: this is stored in plain text in the config file.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storage.s3.useDefaultConfiguration
Use default configuration for the S3 storage backend.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.storageType
Specifies the type of storage backend to use.
Type: one of "memory", "disk", "mongo", "gcp", "minio", "s3", "azureblob", "external"
Default
"disk"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.sumDBs
List of fully qualified URLs that Athens will proxy that the go command can use a checksum verifier.
Type: list of string
Default
["https://sum.golang.org"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.timeout
Timeout for external network calls in seconds.
Type: signed integer
Default
300
Example
3
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.tlsCertFile
Path to the TLS certificate file.
Type: null or path
Default
null
Example
"/etc/ssl/certs/athens.crt"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.tlsKeyFile
Path to the TLS key file.
Type: null or path
Default
null
Example
"/etc/ssl/certs/athens.key"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.traceExporter
Trace exporter to use.
Type: null or one of "jaeger", "datadog"
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.traceExporterURL
URL endpoint that traces will be sent to.
Type: null or string
Default
null
Example
"http://localhost:14268"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.unixSocket
Path to the unix socket file. If set, Athens will listen on the unix socket instead of TCP socket.
Type: null or path
Default
null
Example
"/run/athens.sock"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix
services.athens.validatorHook
Endpoint to validate modules against.
Not used if empty.
Type: null or string
Default
null
Example
"https://validation.example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/athens.nix