1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-08-17 08:30:23 +03:00

Merge pull request #144 from kevingriffin/postgres-character-set

nix-darwin/postgresql: add character set config
This commit is contained in:
Daiderd Jordan 2019-06-05 23:28:23 +02:00 committed by GitHub
commit 7dec9686fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,13 @@ in
description = ''Data directory for PostgreSQL.'';
};
characterSet = mkOption {
type = types.string;
default = "UTF8";
example = "SJIS";
description = ''Character set specified during initialization'';
};
enableTCPIP = mkOption {
type = types.bool;
default = false;
@ -101,7 +108,7 @@ in
script = ''
# Initialise the database.
if ! test -e ${cfg.dataDir}/PG_VERSION; then
initdb -U postgres -D ${cfg.dataDir}
initdb -U postgres -D ${cfg.dataDir} -E ${cfg.characterSet}
fi
${pkgs.coreutils}/bin/ln -sfn ${configFile} ${cfg.dataDir}/postgresql.conf