nixos/freshrss: add ability to use socket path
This change enables server:port combinations like "localhost:5432" but also socket paths like "/run/postgresql". Without this change a port was mendatory and attached to the path (/run/postgresql:5432) resulting in an incorrect socket path. The underlying script already configures paths correctly, so this small change should be enough.
This commit is contained in:
@@ -249,7 +249,10 @@ in
|
||||
${if cfg.database.passFile != null then "--db-password" else null} = ''"$(cat ${cfg.database.passFile})"'';
|
||||
${if cfg.database.user != null then "--db-user" else null} = ''"${cfg.database.user}"'';
|
||||
${if cfg.database.tableprefix != null then "--db-prefix" else null} = ''"${cfg.database.tableprefix}"'';
|
||||
# hostname:port e.g. "localhost:5432"
|
||||
${if cfg.database.host != null && cfg.database.port != null then "--db-host" else null} = ''"${cfg.database.host}:${toString cfg.database.port}"'';
|
||||
# socket path e.g. "/run/postgresql"
|
||||
${if cfg.database.host != null && cfg.database.port == null then "--db-host" else null} = ''"${cfg.database.host}"'';
|
||||
});
|
||||
in
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user