ALPHA: wire is a tool to deploy nixos systems
wire.althaea.zone/
1---
2comment: true
3title: Meta Options
4description: wire hive meta options.
5---
6
7# {{ $frontmatter.title }}
8
9{{ $frontmatter.description }}
10
11## meta.nixpkgs
12
13Tells wire how to get `nixpkgs`.
14
15_Type:_ A path or an instance of `nixpkgs`.
16
17_Default:_ `null`
18
19_Examples:_
20
21```nix
22{
23 # all valid options
24
25 meta.nixpkgs = <nixpkgs>;
26
27 meta.nixpkgs = import <nixpkgs> { };
28
29 meta.nixpkgs = import sources.nixpkgs { };
30
31 meta.nixpkgs = inputs.nixpkgs.outPath;
32
33 meta.nixpkgs = inputs.other-nixpkgs.outPath;
34}
35```
36
37## meta.specialArgs
38
39Extra `specialArgs` to pass to each node & `default`.
40
41::: tip
42
43wire always passes `name` (name of the node)
44and `nodes` (attribute set of all nodes) as args, even if `meta.specialArgs =
45{ }`.
46
47:::
48
49_Type:_ attribute set
50
51_Default:_ `{ }`
52
53_Example:_
54
55```nix
56{
57 meta.specialArgs = {
58 # pass flake inputs as specialArgs
59 inherit inputs;
60 };
61}
62```
63
64## meta.nodeNixpkgs
65
66Per-node nixpkgs to override `meta.nixpkgs`.
67
68See `meta.nixpkgs` examples for possible values.
69
70_Type:_ attribute set of path or an instance of `nixpkgs`
71
72_Default:_ `{ }`
73
74_Example:_
75
76```nix
77{
78 meta = {
79 nixpkgs = import <nixpkgs> { };
80
81 nodeNixpkgs = {
82 node-b = import <special-nixpkgs> { };
83 };
84 };
85
86 node-a =
87 { pkgs, ... }:
88 {
89 # uses <nixpkgs> (meta.nixpkgs)
90 };
91
92 node-b =
93 { pkgs, ... }:
94 {
95 # uses <special-nixpkgs> (meta.nodeNixpkgs.node-b)
96 };
97}
98```