nixos/gitlab: Introduce database pool size option

As well as a extraDatabaseConfig option.
This commit is contained in:
Ben Gamari 2019-02-06 18:45:28 -05:00
parent 88fac8aa40
commit bd5ba09b79

View File

@ -22,7 +22,8 @@ let
password = cfg.databasePassword; password = cfg.databasePassword;
username = cfg.databaseUsername; username = cfg.databaseUsername;
encoding = "utf8"; encoding = "utf8";
}; pool = cfg.databasePool;
} // cfg.extraDatabaseConfig;
}; };
gitalyToml = pkgs.writeText "gitaly.toml" '' gitalyToml = pkgs.writeText "gitaly.toml" ''
@ -253,6 +254,18 @@ in {
description = "Gitlab database user."; description = "Gitlab database user.";
}; };
databasePool = mkOption {
type = types.int;
default = 5;
description = "Database connection pool size.";
};
extraDatabaseConfig = mkOption {
type = types.attrs;
default = {};
description = "Extra configuration in config/database.yml.";
};
host = mkOption { host = mkOption {
type = types.str; type = types.str;
default = config.networking.hostName; default = config.networking.hostName;