Skip to content

Meta Options

wire hive meta options.

meta.nixpkgs

Tells wire how to get nixpkgs.

Type: A path or an instance of nixpkgs.

Default: null

Examples:

nix
{
  # all valid options

  meta.nixpkgs = <nixpkgs>;

  meta.nixpkgs = import <nixpkgs> { };

  meta.nixpkgs = import sources.nixpkgs { };

  meta.nixpkgs = inputs.nixpkgs.outPath;

  meta.nixpkgs = inputs.other-nixpkgs.outPath;
}

meta.specialArgs

Extra specialArgs to pass to each node & default.

TIP

wire always passes name (name of the node) and nodes (attribute set of all nodes) as args, even if meta.specialArgs = { }.

Type: attribute set

Default: { }

Example:

nix
{
  meta.specialArgs = {
    # pass flake inputs as specialArgs
    inherit inputs;
  };
}

meta.nodeNixpkgs

Per-node nixpkgs to override meta.nixpkgs.

See meta.nixpkgs examples for possible values.

Type: attribute set of path or an instance of nixpkgs

Default: { }

Example:

nix
{
  meta = {
    nixpkgs = import <nixpkgs> { };

    nodeNixpkgs = {
      node-b = import <special-nixpkgs> { };
    };
  };

  node-a =
    { pkgs, ... }:
    {
      # uses <nixpkgs> (meta.nixpkgs)
    };

  node-b =
    { pkgs, ... }:
    {
      # uses <special-nixpkgs> (meta.nodeNixpkgs.node-b)
    };
}