Skip to content

postgresql

A free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance.

Categories

Uncategorized

Usage

To use this module, import it like th:

{config, lib, inputs, ...}: {
    imports = [ inputs.clan-core.clanModules.postgresql ];
    # ...
}

Module Options

clan.postgresql.databases

Databases to create

Type: attribute set of (submodule)

Default:

{ }

postgresql

clan.postgresql.databases.<name>.create.enable

Create the database if it does not exist.

Type: boolean

Default:

true

postgresql

clan.postgresql.databases.<name>.create.options

Options to pass to the CREATE DATABASE command.

Type: lazy attribute set of string

Default:

{ }
Example
{
  ENCODING = "UTF8";
  LC_COLLATE = "C";
  LC_CTYPE = "C";
  OWNER = "foo";
  TEMPLATE = "template0";
}

postgresql

clan.postgresql.databases.<name>.name

Database name.

Type: string

Default:

"‹name›"

postgresql

clan.postgresql.databases.<name>.restore.stopOnRestore

List of systemd services to stop before restoring the database.

Type: list of string

Default:

[ ]

postgresql

clan.postgresql.databases.<name>.service

Service name that we associate with the database.

Type: string

Default:

"‹name›"

postgresql

clan.postgresql.users

Users to create

Type: attribute set of (submodule)

Default:

{ }

postgresql

clan.postgresql.users.<name>.name

User name

Type: string

Default:

"‹name›"

postgresql