Commit b5fcbad5 authored by NotAShelf's avatar NotAShelf Committed by Yt
Browse files

nixos/lemmy: handle database creation better

parent 883ea1e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = [