diff --git a/arch/conduwuit.service b/arch/conduwuit.service index 4f45ddc0..c86e37bd 100644 --- a/arch/conduwuit.service +++ b/arch/conduwuit.service @@ -1,11 +1,11 @@ [Unit] -Description=conduwuit Matrix homeserver + +Description=Continuwuity - Matrix homeserver Wants=network-online.target After=network-online.target -Documentation=https://conduwuit.puppyirl.gay/ +Documentation=https://continuwuity.org/ RequiresMountsFor=/var/lib/private/conduwuit Alias=matrix-conduwuit.service - [Service] DynamicUser=yes Type=notify-reload @@ -59,7 +59,7 @@ StateDirectory=conduwuit RuntimeDirectory=conduwuit RuntimeDirectoryMode=0750 -Environment="CONDUWUIT_CONFIG=/etc/conduwuit/conduwuit.toml" +Environment="CONTINUWUITY_CONFIG=/etc/conduwuit/conduwuit.toml" BindPaths=/var/lib/private/conduwuit:/var/lib/matrix-conduit BindPaths=/var/lib/private/conduwuit:/var/lib/private/matrix-conduit diff --git a/debian/conduwuit.service b/debian/conduwuit.service index 3d2fbc9b..be2f3dae 100644 --- a/debian/conduwuit.service +++ b/debian/conduwuit.service @@ -1,9 +1,10 @@ [Unit] -Description=conduwuit Matrix homeserver + +Description=Continuwuity - Matrix homeserver Wants=network-online.target After=network-online.target -Alias=matrix-conduwuit.service Documentation=https://continuwuity.org/ +Alias=matrix-conduwuit.service [Service] DynamicUser=yes @@ -11,7 +12,7 @@ User=conduwuit Group=conduwuit Type=notify -Environment="CONDUWUIT_CONFIG=/etc/conduwuit/conduwuit.toml" +Environment="CONTINUWUITY_CONFIG=/etc/conduwuit/conduwuit.toml" ExecStart=/usr/sbin/conduwuit diff --git a/nix/pkgs/complement/default.nix b/nix/pkgs/complement/default.nix index 9b010e14..1295cb03 100644 --- a/nix/pkgs/complement/default.nix +++ b/nix/pkgs/complement/default.nix @@ -75,9 +75,9 @@ dockerTools.buildImage { else []; Env = [ - "CONDUWUIT_TLS__KEY=${./private_key.key}" - "CONDUWUIT_TLS__CERTS=${./certificate.crt}" - "CONDUWUIT_CONFIG=${./config.toml}" + "CONTINUWUITY_TLS__KEY=${./private_key.key}" + "CONTINUWUITY_TLS__CERTS=${./certificate.crt}" + "CONTINUWUITY_CONFIG=${./config.toml}" "RUST_BACKTRACE=full" ]; diff --git a/src/core/config/mod.rs b/src/core/config/mod.rs index 5374c2c2..5648a126 100644 --- a/src/core/config/mod.rs +++ b/src/core/config/mod.rs @@ -1962,7 +1962,11 @@ impl Config { where I: Iterator, { - let envs = [Env::var("CONDUIT_CONFIG"), Env::var("CONDUWUIT_CONFIG")]; + let envs = [ + Env::var("CONDUIT_CONFIG"), + Env::var("CONDUWUIT_CONFIG"), + Env::var("CONTINUWUITY_CONFIG"), + ]; let config = envs .into_iter() @@ -1971,7 +1975,8 @@ impl Config { .chain(paths.map(Toml::file)) .fold(Figment::new(), |config, file| config.merge(file.nested())) .merge(Env::prefixed("CONDUIT_").global().split("__")) - .merge(Env::prefixed("CONDUWUIT_").global().split("__")); + .merge(Env::prefixed("CONDUWUIT_").global().split("__")) + .merge(Env::prefixed("CONTINUWUITY_").global().split("__")); Ok(config) } diff --git a/src/main/clap.rs b/src/main/clap.rs index 707a1c76..9b63af19 100644 --- a/src/main/clap.rs +++ b/src/main/clap.rs @@ -74,17 +74,30 @@ pub(crate) struct Args { /// with the exception of the last bucket, try increasing this value to e.g. /// 50 or 100. Inversely, decrease to 10 etc if the histogram lacks /// resolution. - #[arg(long, hide(true), env = "CONDUWUIT_RUNTIME_HISTOGRAM_INTERVAL", default_value = "25")] + #[arg( + long, + hide(true), + env = "CONTINUWUITY_RUNTIME_HISTOGRAM_INTERVAL", + env = "CONDUWUIT_RUNTIME_HISTOGRAM_INTERVAL", + default_value = "25" + )] pub(crate) worker_histogram_interval: u64, /// Set the histogram bucket count (tokio_unstable). Default is 20. - #[arg(long, hide(true), env = "CONDUWUIT_RUNTIME_HISTOGRAM_BUCKETS", default_value = "20")] + #[arg( + long, + hide(true), + env = "CONTINUWUITY_RUNTIME_HISTOGRAM_BUCKETS", + env = "CONDUWUIT_RUNTIME_HISTOGRAM_BUCKETS", + default_value = "20" + )] pub(crate) worker_histogram_buckets: usize, /// Toggles worker affinity feature. #[arg( long, hide(true), + env = "CONTINUWUITY_RUNTIME_WORKER_AFFINITY", env = "CONDUWUIT_RUNTIME_WORKER_AFFINITY", action = ArgAction::Set, num_args = 0..=1, @@ -99,6 +112,7 @@ pub(crate) struct Args { #[arg( long, hide(true), + env = "CONTINUWUITY_RUNTIME_GC_ON_PARK", env = "CONDUWUIT_RUNTIME_GC_ON_PARK", action = ArgAction::Set, num_args = 0..=1,