nixos/discourse: fails to start #375168
Labels
0.kind: bug
Something is broken
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Nixpkgs version
Describe the bug
databaseActuallyCreateLocally determines if we create discourse-postgresql.service but discourse.service still depends on it when host = null;
This causes an issue when we want to connect to a postgresql service by socket but not have it managed by services.discourse.database
Steps to reproduce
The below config is made so I can use discourse, but with my own postgres management
This is so I can get around the services.postgresql.ensureUsers.*.passwordFile issue: #326306
This is also in my opinion more secure since im not having to footgun a secret in a .drv
At runtime the discourse-progresql.service doesn't exist due to
lib.mkIf databaseActuallyCreateLocally {...}
Expected behaviour
databaseActuallyCreateLocally should only handle the ensureDatabases = [ "discourse" ]; equivalent of the module.
Screenshots
service not started:

Failing to start:

Relevant log output
Additional context
No response
System metadata
Built with nixos-rebuild build-vm

Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: