services.synapse-auto-compressor.postgresUrl
Connection string to postgresql in the
rust postgres crate config format.
The module will attempt to build a URL-style connection string out of the services.matrix-synapse.settings.database.args
if a local synapse is enabled.
- Type
string- Default
let synapseConfig = config.services.matrix-synapse; args = synapseConfig.settings.database.args; in if synapseConfig.enable then ''postgresql://${args.user}${lib.optionalString (args ? password) (":" + args.password)}@${ lib.escapeURL (if (args ? host) then args.host else "/run/postgresql") }${lib.optionalString (args ? port) (":" + args.port)}${args.database}'' else null;- Example
"postgresql://username:password@mydomain.com:port/database"- Declared
- <nixpkgs/nixos/modules/services/matrix/synapse-auto-compressor.nix>