From 2cd9bdc3ac1376b595f932273329bf0f799ad451 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 8 Jul 2023 12:04:33 -0700 Subject: [PATCH] lemmyCfg should return a file --- lemmy-docker.nix | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lemmy-docker.nix b/lemmy-docker.nix index afab0df..44af331 100644 --- a/lemmy-docker.nix +++ b/lemmy-docker.nix @@ -92,22 +92,23 @@ let } ''; - lemmyCfg = { hostname, postgresPasswd, pictrsApiKey, smtpServer, ... }: { - database = { - host = "postgres"; - password = postgresPasswd; - }; - hostname = hostname; - pictrs = { - url = "http://pictrs:8080/"; - api_key = pictrsApiKey; - }; - email = { - smtp_server = smtpServer; - tls_type = "none"; - smtp_from_address = "noreply@${hostname}"; - }; - }; + lemmyCfg = { hostname, postgresPasswd, pictrsApiKey, smtpServer, ... }: + pkgs.writeText "lemmy.hjson" (builtins.toJSON { + database = { + host = "postgres"; + password = postgresPasswd; + }; + hostname = hostname; + pictrs = { + url = "http://pictrs:8080/"; + api_key = pictrsApiKey; + }; + email = { + smtp_server = smtpServer; + tls_type = "none"; + smtp_from_address = "noreply@${hostname}"; + }; + }); lemmyDockerComposeCfg = { hostname, port, lemmyCfgFile, nginxCfgFile , pictrsApiKey, stateDirectory, postgresPasswd, lemmyDockerImage