Skip to content

postgresql

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

Categories

Uncategorized

Usage via Inventory

This module cannot be used via the inventory interface.

Usage via Nix

This module can be also imported directly in your nixos configuration. Although it is recommended to use the inventory interface if available.

Some modules are considered 'low-level' or 'expert modules' and are not available via the inventory interface.

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

Module Options

The following options are available for this module.

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