nixos/lemmy: handle database creation better
This commit is contained in:
parent
883ea1e0ba
commit
b5fcbad5fb
@ -202,7 +202,7 @@ in
|
||||
|
||||
environment = {
|
||||
LEMMY_CONFIG_LOCATION = "${settingsFormat.generate "config.hjson" cfg.settings}";
|
||||
LEMMY_DATABASE_URL = mkIf (cfg.database.uri != null) cfg.database.uri;
|
||||
LEMMY_DATABASE_URL = if cfg.database.uri != null then cfg.database.uri else (mkIf (cfg.database.createLocally) "postgres:///lemmy?host=/run/postgresql&user=lemmy");
|
||||
};
|
||||
|
||||
documentation = [
|
||||
|
Loading…
Reference in New Issue
Block a user