Templates
Interact with templates
Usage: clan templates
This subcommand provides an interface to templates provided by clan.
Examples
$ clan templates list
List all the machines managed by Clan.
Usage differs based on the template type
Clan templates
$ clan flakes create --template=default
Create a clan from the shipped (
$ clan flakes create --template=.#myTemplate
Create a clan from the myTemplate
template defined in the current flake
$ clan flakes create --template=github:owner/repo#foo
Specifies a remote url or path to the flake containing the template 'foo'
Disk templates
$ clan templates apply disk [TEMPLATE] [MACHINE]
Will apply the specified [TEMPLATE] to the [MACHINE]
Many templates require to set variables via the --set
flag.
$ clan templates apply disk [TEMPLATE] [MACHINE] --set key1 value1 --set key2 value2
Real world example
$ clan templates apply disk single-disk jon --set mainDisk "/dev/disk/by-id/nvme-WD_PC_SN740_SDDQNQD-512G-1201_232557804368"
Templates apply
Usage: clan templates apply
Commands
- disk:
Templates apply disk
Usage: clan templates apply disk
Positional arguments
- template: The name of the disk template to apply
- machine: The machine to apply the template to
Options
- --set:
<('placeholder', 'value')>
Set a placeholder in the template to a value - --force: Force apply the template even if the machine already has a disk schema
- --skip-hardware-check: Disables hardware checking. By default this command checks that the facter.json report exists and validates provided options
- --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable
Templates list
Usage: clan templates list
Options
- --debug: Enable debug logging
- --option:
<('name', 'value')>
Nix option to set - --flake:
<PATH>
path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable