Add documentation.

This commit is contained in:
R-VdP 2023-02-15 14:16:47 +01:00
parent 0d1067ac72
commit 642c8be096
No known key found for this signature in database

View file

@ -15,31 +15,38 @@ struct Args {
#[derive(clap::Args, Debug)] #[derive(clap::Args, Debug)]
struct BuildArgs { struct BuildArgs {
#[arg(long)] #[arg(long)]
/// The flake defining the system-manager profile
flake_uri: String, flake_uri: String,
} }
#[derive(clap::Args, Debug)] #[derive(clap::Args, Debug)]
struct ActivationArgs { struct ActivationArgs {
#[arg(long, action)] #[arg(long, action)]
/// If true, only write under /run, otherwise write under /etc
ephemeral: bool, ephemeral: bool,
} }
#[derive(clap::Subcommand, Debug)] #[derive(clap::Subcommand, Debug)]
enum Action { enum Action {
/// Activate a given system-manager profile
Activate { Activate {
#[arg(long)] #[arg(long)]
/// The store path containing the system-manager profile to activate
store_path: StorePath, store_path: StorePath,
#[command(flatten)] #[command(flatten)]
activation_args: ActivationArgs, activation_args: ActivationArgs,
}, },
/// Build a new system-manager generation without registering it as a nix profile
Build { Build {
#[command(flatten)] #[command(flatten)]
build_args: BuildArgs, build_args: BuildArgs,
}, },
/// Generate a new system-manager generation
Generate { Generate {
#[command(flatten)] #[command(flatten)]
build_args: BuildArgs, build_args: BuildArgs,
}, },
/// Generate a new system-manager generation and activate it
Switch { Switch {
#[command(flatten)] #[command(flatten)]
build_args: BuildArgs, build_args: BuildArgs,