Package with nix and add systemd unit example

This commit is contained in:
oxalica 2024-08-31 15:40:41 -04:00
parent a63d0df443
commit e84b13c876
9 changed files with 287 additions and 3 deletions

View file

@ -11,9 +11,11 @@ pub struct Config {
pub server: ServerConfig,
}
#[serde_inline_default]
#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct DatabaseConfig {
#[serde_inline_default("/var/lib/blahd/db.sqlite".into())]
pub path: PathBuf,
}

View file

@ -31,7 +31,9 @@ mod middleware;
mod config;
mod utils;
/// Blah Chat Server
#[derive(Debug, clap::Parser)]
#[clap(about, version = option_env!("CFG_RELEASE").unwrap_or(env!("CARGO_PKG_VERSION")))]
enum Cli {
/// Run the server with given configuration.
Serve {