Skip to content

BuildClan

This provides an overview of the available arguments of the clan interface.

Each attribute is documented below

  • buildClan: A function that takes an attribute set.`.

    buildClan Example
    buildClan {
        directory = self;
        machines = {
            jon = { };
            sara = { };
        };
    };
    
  • flake-parts: Each attribute can be defined via clan.<attribute name>. See our flake-parts guide.

    flake-parts Example
    flake-parts.lib.mkFlake { inherit inputs; } ({
        systems = [];
        imports = [
            clan-core.flakeModules.default
        ];
        clan = {
            machines = {
                jon = { };
                sara = { };
            };
        };
    });
    

directory

The directory containing the clan.

A typical directory structure could look like this:

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

Type: path

Default:

"Root directory of the flake"

interface.nix

inventory

The Inventory submodule.

For details see the Inventory documentation.

Type: submodule

interface.nix

machines

A mapping of machine names to their nixos configuration.

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

Type: attribute set of module

Default:

{ }

interface.nix

meta

Global information about the clan.

Type: module

Default:

{ }

interface.nix

meta.description

Optional freeform description

Type: null or string

Default:

null

meta-interface.nix

meta.icon

Under construction, will be used for the UI

Type: null or string

Default:

null

meta-interface.nix

meta.name

Name of the clan.

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

Type: string

meta-interface.nix

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"

interface.nix

specialArgs

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

Type: attribute set of raw value

Default:

{ }

interface.nix