Add site_name

This commit is contained in:
niten 2023-07-17 21:52:46 -07:00
parent cc5525c46b
commit 5fb3aa3cea
1 changed files with 8 additions and 1 deletions

View File

@ -152,7 +152,7 @@ let
}
'';
makeLemmyCfg = { hostname, postgresPasswd, pictrsApiKey, smtpServer
makeLemmyCfg = { hostname, postgresPasswd, pictrsApiKey, smtpServer, siteName
, adminPasswd ? null, ... }:
pkgs.writeText "lemmy.hjson" (builtins.toJSON {
database = {
@ -172,6 +172,7 @@ let
setup = {
admin_username = "admin";
admin_password = adminPasswd;
site_name = siteName;
};
});
@ -217,6 +218,11 @@ in {
description = "Hostname at which this server is accessible.";
};
site-name = mkOption {
type = str;
description = "Name of this server.";
};
port = mkOption {
type = port;
description = "Port on which to listen for Lemmy connections.";
@ -303,6 +309,7 @@ in {
inherit postgresPasswd pictrsApiKey;
smtpServer = cfg.smtp-server;
adminPasswd = adminPasswd;
siteName = cfg.site-name;
};
target-file = "/run/lemmy/lemmy.hjson";
};