Skip to content

omnigent ​

AI coding agent server. Omnigent is a meta-harness for running, governing and collaborating on AI coding agents from a shared server, with native OIDC login, policies and session history.

The OIDC session cookie secret needs to be 64 hex characters, generate it with openssl rand -hex 32.

Example ​

nix
{
  nps.stacks.omnigent = {
    enable = true;

    db = {
      type = "postgres";
      passwordFile = config.sops.secrets."omnigent/db_password".path;
    };

    oidc = {
      enable = true;
      clientSecretFile = config.sops.secrets."omnigent/oidc/client_secret".path;
      cookieSecretFile = config.sops.secrets."omnigent/oidc/cookie_secret".path;
      # clientSecretHash = ... # optional, defaults to hashing clientSecretFile
    };
  };
}

Stack Options ​

nps.stacks.omnigent.db.passwordFile ​

The file containing the PostgreSQL password for the database. Only used if db.type is set to "postgres".

Type
plaintext
absolute path
Declaration

nps.stacks.omnigent.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.

Type
plaintext
one of "sqlite", "postgres"
Default
nix
"sqlite"
Declaration

nps.stacks.omnigent.db.username ​

The PostgreSQL user to use for the database. Only used if db.type is set to "postgres".

Type
plaintext
string
Default
nix
"omnigent"
Declaration

nps.stacks.omnigent.enable ​

Whether to enable omnigent.

Type
plaintext
boolean
Default
nix
false
Example
nix
true
Declaration

nps.stacks.omnigent.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://omnigent.ai/docs/deploy/overview#docker-compose for available variables.

Type
plaintext
attribute set of (null or boolean or signed integer or string or absolute path or (submodule))
Default
nix
{ }
Example
nix
{
  OMNIGENT_FEATURES = "usage_page";
  OMNIGENT_SHARING_MODE = "read_only";
}
Declaration

nps.stacks.omnigent.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

Type
plaintext
absolute path
Example
nix
config.sops.secrets."immich/authelia/client_secret".path"
Declaration

nps.stacks.omnigent.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:

  1. As a literal string
  2. As an absolute path to a file containing the hash (toFile)
  3. As an absolute oath to a file containing the client_secret, in which case the hash will be automatically computed (toHash)
  4. 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.

Type
plaintext
null or string or (submodule)
Default
nix
null
Example
nix
# 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
Declaration

nps.stacks.omnigent.oidc.cookieSecretFile ​

File containing the OIDC session cookie secret (64 hex characters). Generate with openssl rand -hex 32.

Type
plaintext
absolute path
Declaration

nps.stacks.omnigent.oidc.enable ​

Whether to enable OIDC login with Authelia. This will register an OIDC client in Authelia and setup the necessary configuration.

Omnigent has native OIDC support and handles the login flow itself.

For details, see:

Type
plaintext
boolean
Default
nix
false
Declaration

nps.stacks.omnigent.oidc.userGroup ​

Users of this group will be able to log in

Type
plaintext
string
Default
nix
"omnigent_user"
Declaration

Container Aliases ​

nps.stacks.omnigent.containers.omnigent ​

Alias of {option}services.podman.containers.omnigent.

Type
plaintext
submodule
Declaration

nps.stacks.omnigent.containers.omnigent-db ​

Alias of {option}services.podman.containers.omnigent-db.

Type
plaintext
submodule
Declaration