gatus
Health dashboard for containers
Example
{config, ...}: {
nps.stacks.gatus = {
enable = true;
db = {
type = "postgres";
passwordFile = config.sops.secrets."gatus/postgresPassword".path;
};
settings.endpoints = [
{
name = "Some website";
url = "https://example.com";
client.dns-resolver = "tcp://1.1.1.1:53";
conditions = [
"[STATUS] == 200"
];
}
];
oidc = {
enable = true;
clientSecretFile = config.sops.secrets."gatus/authelia_client_secret".path;
clientSecretHash = "$pbkdf2-sha512$...";
};
};
}Stack Options
nps.stacks.gatus.containers.gatus
Alias of {option}services.podman.containers.gatus.
nps.stacks.gatus.containers.gatus-db
Alias of {option}services.podman.containers.gatus-db.
nps.stacks.gatus.db.passwordFile
The file containing the PostgreSQL password for the database. Only used if db.type is set to "postgres".
nps.stacks.gatus.db.type
Type of the database to use.
Can be set to "sqlite" or "postgres".
If set to "postgres", the passwordFile option must be set.
nps.stacks.gatus.db.username
The PostgreSQL user to use for the database. Only used if db.type is set to "postgres".
nps.stacks.gatus.defaultEndpoint
Default endpoint settings. Will merged with each provided endpoint. Only applies if endpoint does not override the default endpoint settings.
YAML 1.1 value
{
client = {
insecure = true;
timeout = "10s";
};
conditions = [
"[STATUS] >= 200"
"[STATUS] < 300"
];
group = "core";
interval = "5m";
}
nps.stacks.gatus.enable
Whether to enable Gatus. The module also provides an extension that will add Gatus options to a container. This allows services to be added to Gatus by settings container options.
nps.stacks.gatus.extraEnv
Extra environment variables to set for the container. Variables can be either set directly or sourced from a file (e.g. for secrets).
See https://github.com/TwiN/gatus?tab=readme-ov-file#configuration
attribute set of (null or boolean or signed integer or string or absolute path or (submodule))
{ }
{
FOO = "bar";
SOME_SECRET = {
fromFile = "/run/secrets/secret_name";
};
}
nps.stacks.gatus.extraSettingsFiles
List of additional YAML files to include in the settings. These files will be mounted as is. Can be used to directly provide YAML files containing secrets, e.g. from sops
nps.stacks.gatus.oidc.clientSecretFile
The file containing the client secret for the OIDC client that will be registered in Authelia.
For examples on how to generate a client secret, see
https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#client-secret
string
config.sops.secrets."immich/authelia/client_secret".path"
nps.stacks.gatus.oidc.clientSecretHash
The client secret hash. For examples on how to generate a client secret, see https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#client-secret
The value can be passed in multiple ways:
- As a literal string
- As an absolute path to a file containing the hash (
toFile) - As an absolute oath to a file containing the client_secret, in which case the hash will be automatically computed (
toHash) - As
null
If left unset (null), the client secret will be read from the file specified in the clientSecretFile option and hashed automatically before being passed to the Authelia container.
null or string or (submodule)
null
# Literal String:
"$pbkdf2-sha512$310000$cbOAIWbfz3vCVXIPIp6d2A$J0klwULa6TvPRCU1HAfuKua/dMKTl8gbTYJz2N73ejGUu0LUGz/y3kwmJLuKuAYGg3WQOT0q9ZzVHHUvpKpgvQ"
# Client secret hash stored in a file
{ fromFile = config.sops.secrets."immich/client_secret_hash".path; }
# Client secret stored in a file: Hash will be computed dynamically
{ toHash = config.sops.secrets."immich/client_secret".path; }
# Null (default): Hash will be computed automatically based on the clientSecretFile option
# Equivalent to { toHash = cfg.oidc.clientSecretFile; }
null
nps.stacks.gatus.oidc.enable
Whether to enable OIDC login with Authelia. This will register an OIDC client in Authelia and setup the necessary configuration.
For details, see:
nps.stacks.gatus.oidc.userGroup
Users of this group will be able to log in
nps.stacks.gatus.settings
Settings for the Gatus container. Will be converted to YAML and passed to the container.