1
0
forked from clan/clan-core

Compare commits

...

2 Commits

Author SHA1 Message Date
e9e5e702e5 init: 2024-04-30 10:37:36 +02:00
d2beeba6ff clan: init manpage 2024-04-26 14:02:24 +02:00
4 changed files with 63 additions and 0 deletions

View File

@ -27,6 +27,7 @@
qemu,
gnupg,
e2fsprogs,
mandown,
mypy,
clan-core-path,
}:
@ -120,6 +121,7 @@ python3.pkgs.buildPythonApplication {
nativeBuildInputs = [
setuptools
installShellFiles
mandown
];
propagatedBuildInputs = pythonDependencies;
@ -178,6 +180,8 @@ python3.pkgs.buildPythonApplication {
<(${argcomplete}/bin/register-python-argcomplete --shell bash clan)
installShellCompletion --fish --name clan.fish \
<(${argcomplete}/bin/register-python-argcomplete --shell fish clan)
mandown $src/man/clan.md > ./clan.1
installManPage ./clan.1
'';
# Clean up after the package to avoid leaking python packages into a devshell

View File

@ -42,6 +42,7 @@
packages = {
clan-cli = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (inputs) nixpkgs;
mandown = pkgs.mandown;
clan-core-path = clanCoreWithVendoredDeps;
};
default = self'.packages.clan-cli;

View File

@ -0,0 +1,7 @@
# Manpages for the clan cli
Run:
```
nix run nixpkgs#manpage [.md] > [manpage.1]
```
to convert a markdown page into a man page.

51
pkgs/clan-cli/man/clan.md Normal file
View File

@ -0,0 +1,51 @@
## NAME
clan - the clan cli tool
## SYNOPSIS
clan [OPTION...] [SUBCOMMAND]
## DESCRIPTION
**clan** is the cli for managing and deploying various nixos configurations in a unified coherent way.
Secrets and passwords can be provisioned, set and retrieved.
Machines can be remotely installed through the **install** subcommand.
For more overview please refer to the reference material at docs.clan.lol.
## OPTIONS
### -h, --help
Output a help message and exit.
### --debug
Enable debug logging.
### --option name value
Nix option to set.
### --flake=FLAKE
Path to the flake where the clan resides in, can be a remote flake, or local.
## SUBCOMMANDS
### clan-backups(1)
Manage backups of clan machines
### clan-flakes(1)
Create a clan flake inside the current directory
### clan-config(1)
Set nixos-configuration
### clan-ssh(1)
SSH to a remote machine
### clan-secrets(1)
Manage secrets
### clan-facts(1)
Manage facts
### clan-machines(1)
Manage machines and their configuration
### clan-vms(1)
Manage virtual machines
### clan-history(1)
Manage history
### clan-flash(1)
Flash machines to usb sticks or into isos