]> Untitled Git - lemmy.git/blobdiff - crates/utils/src/settings/structs.rs
Add site option for default theme (#2104)
[lemmy.git] / crates / utils / src / settings / structs.rs
index ae7bd544ae2c2c57348d25620ffc45fbe893bf81..16ead86373d50856cd5b6e3fd6b0c097b3d8b54d 100644 (file)
@@ -49,6 +49,11 @@ pub struct Settings {
   /// Maximum number of HTTP requests allowed to handle a single incoming activity (or a single object fetch through the search).
   #[default(25)]
   pub http_fetch_retry_limit: i32,
+
+  /// Set the URL for opentelemetry exports. If you do not have an opentelemetry collector, do not set this option
+  #[default(None)]
+  #[doku(skip)]
+  pub opentelemetry_url: Option<String>,
 }
 
 #[derive(Debug, Deserialize, Serialize, Clone, SmartDefault, Document)]
@@ -85,7 +90,7 @@ pub struct DatabaseConfig {
   pub pool_size: u32,
 }
 
-#[derive(Debug, Deserialize, Serialize, Clone, Document)]
+#[derive(Debug, Deserialize, Serialize, Clone, Document, SmartDefault)]
 pub struct EmailConfig {
   /// Hostname and port of the smtp server
   #[doku(example = "localhost:25")]
@@ -97,8 +102,10 @@ pub struct EmailConfig {
   #[doku(example = "noreply@example.com")]
   /// Address to send emails from, eg "noreply@your-instance.com"
   pub smtp_from_address: String,
-  /// Whether or not smtp connections should use tls
-  pub use_tls: bool,
+  /// Whether or not smtp connections should use tls. Can be none, tls, or starttls
+  #[default("none")]
+  #[doku(example = "none")]
+  pub tls_type: String,
 }
 
 #[derive(Debug, Deserialize, Serialize, Clone, SmartDefault, Document)]
@@ -190,4 +197,14 @@ pub struct SetupConfig {
   pub enable_nsfw: Option<bool>,
   #[default(None)]
   pub community_creation_admin_only: Option<bool>,
+  #[default(None)]
+  pub require_email_verification: Option<bool>,
+  #[default(None)]
+  pub require_application: Option<bool>,
+  #[default(None)]
+  pub application_question: Option<String>,
+  #[default(None)]
+  pub private_instance: Option<bool>,
+  #[default(None)]
+  pub default_theme: Option<String>,
 }