Skip to content

Clan Options

This provides an overview of the available options

Those can be set via clan-core.lib.clan function, or via the clan attribute of flake-parts.

directory

Attribute: directory

The directory containing the clan.

A typical directory structure could look like this:

.
├── flake.nix
├── assets
├── machines
├── modules
└── sops

Type: absolute path or raw value convertible to it

Default:

"Root directory of the flake"

Declared in: lib/modules/clan/interface.nix

machines

Attribute: machines

A mapping of machine names to their nixos configuration.

Example
machines = {
  my-machine = {
    # Your nixos configuration
  };
};

Type: attribute set of module

Default:

{ }

Declared in: lib/modules/clan/interface.nix

meta

Attribute: meta

Global information about the clan.

Type: module

Default:

{ }

Declared in: lib/modules/clan/interface.nix

description

Attribute: meta.description

Optional freeform description

Type: null or string

Default:

null

Declared in: lib/modules/inventoryClass/meta-interface.nix

icon

Attribute: meta.icon

Under construction, will be used for the UI

Type: null or string

Default:

null

Declared in: lib/modules/inventoryClass/meta-interface.nix

name

Attribute: meta.name

Name of the clan.

Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to.

Should only contain alphanumeric characters, _ and -.

Type: string matching the pattern [a-zA-Z0-9_-]*

Example
"my_clan"

Declared in: lib/modules/inventoryClass/meta-interface.nix

modules

Attribute: modules

An attribute set of exported modules.

Type: attribute set of raw value

Default:

{ }

Declared in: lib/modules/clan/interface.nix

outputs

Attribute: outputs

moduleForMachine

Attribute: outputs.moduleForMachine

This option has no description.

Type: attribute set of module

Declared in: lib/modules/clan/module.nix

pkgsForSystem

Attribute: pkgsForSystem

A function that maps from architecture to pkg. ( string -> pkgs )

If specified this nixpkgs will be only imported once for each system. This improves performance, but all nixpkgs.* options will be ignored.

Returning null for a system will fallback to the default behavior of respecting the nixpkgs.* options.

Type: function that evaluates to a(n) (null or (attribute set))

Default:

"system: null"

Declared in: lib/modules/clan/interface.nix

secrets

Attribute: secrets

Secrets related options such as AGE plugins required to encrypt/decrypt secrets using the CLI.

Type: submodule

Default:

{ }

Declared in: lib/modules/clan/interface.nix

age

Attribute: secrets.age

plugins

Attribute: secrets.age.plugins

A list of age plugins which must be available in the shell when encrypting and decrypting secrets.

Type: list of string matching the pattern age-plugin-.*

Default:

[ ]

Declared in: lib/modules/clan/secrets.nix

self

Attribute: self

This is used to import external clan modules.

Type: raw value

Default:

"Reference to the current flake"

Declared in: lib/modules/clan/interface.nix

specialArgs

Attribute: specialArgs

Extra arguments to pass to nixosSystem i.e. useful to make self available

Type: attribute set of raw value

Default:

{ }

Declared in: lib/modules/clan/interface.nix

templates

Attribute: templates

Define Clan templates.

Type: submodule

Default:

{ }

Declared in: lib/modules/clan/interface.nix

clan

Attribute: templates.clan

Holds the different clan templates.

Type: attribute set of (submodule)

Default:

{ }

Declared in: lib/modules/clan/templates.nix

description

Attribute: templates.clan.<name>.description

The name of the template.

Type: string

Default:

"‹name›"

Declared in: lib/modules/clan/templates.nix

path

Attribute: templates.clan.<name>.path

Holds the path to the clan template.

Type: absolute path

Declared in: lib/modules/clan/templates.nix

disko

Attribute: templates.disko

Holds different disko templates.

Type: attribute set of (submodule)

Default:

{ }

Declared in: lib/modules/clan/templates.nix

description

Attribute: templates.disko.<name>.description

The name of the template.

Type: string

Default:

"‹name›"

Declared in: lib/modules/clan/templates.nix

path

Attribute: templates.disko.<name>.path

Holds the path to the clan template.

Type: absolute path

Declared in: lib/modules/clan/templates.nix

machine

Attribute: templates.machine

Holds the different machine templates.

Type: attribute set of (submodule)

Default:

{ }

Declared in: lib/modules/clan/templates.nix

description

Attribute: templates.machine.<name>.description

The name of the template.

Type: string

Default:

"‹name›"

Declared in: lib/modules/clan/templates.nix

path

Attribute: templates.machine.<name>.path

Holds the path to the clan template.

Type: absolute path

Declared in: lib/modules/clan/templates.nix