Skip to content

Machines

manage machines and their configuration

Usage: clan machines

Commands

  • create:
  • delete:
  • install: Install a configured machine over the network.The target must be a Linux based system reachable via SSH. Installing a machine means overwriting the target's disk.
  • list:
  • update:
  • update-hardware-config: Generates hardware specifics for a machine. Such as the host platform, available kernel modules, etc. The target must be a Linux based system reachable via SSH.

This subcommand provides an interface to machines managed by clan.

Examples

$ clan machines list

List all the machines managed by clan.

$ clan machines update [MACHINES]

Will update the specified machine [MACHINE], if [MACHINE] is omitted, the command will attempt to update every configured machine.

$ clan machines install [MACHINES] [TARGET_HOST]

Will install the specified machine [MACHINE], to the specified [TARGET_HOST].

For more detailed information, visit: deploy

Machines create

Usage: clan machines create

Positional arguments

  1. machine_name: The name of the machine to import
Options
  • --tags: Tags to associate with the machine. Can be used to assign multiple machines to services.
  • --template-name: The name of the template machine to import
  • --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

Machines delete

Usage: clan machines delete

Positional arguments

  1. name:
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

Machines install

Install a configured machine over the network. The target must be a Linux based system reachable via SSH. Installing a machine means overwriting the target's disk.

Usage: clan machines install

Positional arguments

  1. machine: machine to install
  2. target_host: ssh address to install to in the form of user@host:2222
Options
  • --kexec: use another kexec tarball to bootstrap NixOS
  • --no-reboot: do not reboot after installation
  • --build-on-remote: build the NixOS configuration on the remote machine
  • --yes: do not ask for confirmation
  • -j, --json: specify the json file for ssh data (generated by starting the clan installer)
  • -P, --png: specify the json file for ssh data as the qrcode image (generated by starting the clan installer)
  • --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

Machines list

Usage: clan machines 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

Machines update

Usage: clan machines update

Positional arguments

  1. machines: <MACHINE> machine to update. If no machine is specified, all machines will be updated.
Options
  • --host-key-check: (Default: ask) Host key (.ssh/known_hosts) check mode
  • --target-host: address of the machine to update, in the format of user@host:1234
  • --darwin: Hack to deploy darwin machines. This will be removed in the future when we have full darwin integration.
  • --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

Machines update-hardware-config

Generates hardware specifics for a machine. Such as the host platform, available kernel modules, etc.

The target must be a Linux based system reachable via SSH.

Usage: clan machines update-hardware-config

Positional arguments

  1. machine: the name of the machine
  2. target_host: ssh address to install to in the form of user@host:2222
Options
  • --password: Pre-provided password the cli will prompt otherwise if needed.
  • --backend: (Default: nixos-generate-config) The type of hardware report to generate.
  • --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