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# Meta Options 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.nodeSpecialArgs 65 66Extra `specialArgs` to override `meta.specialArgs` for each node 67 68_Type:_ attribute set of attribute set 69 70_Default:_ `{ }` 71 72_Example:_ 73 74```nix 75{ 76 meta.nodeSpecialArgs = { 77 extra-property = "some-value"; 78 }; 79} 80``` 81 82## meta.nodeNixpkgs 83 84Per-node nixpkgs to override `meta.nixpkgs`. 85 86See `meta.nixpkgs` examples for possible values. 87 88_Type:_ attribute set of path or an instance of `nixpkgs` 89 90_Default:_ `{ }` 91 92_Example:_ 93 94```nix 95{ 96 meta = { 97 nixpkgs = import <nixpkgs> { }; 98 99 nodeNixpkgs = { 100 node-b = import <special-nixpkgs> { }; 101 }; 102 }; 103 104 node-a = 105 { pkgs, ... }: 106 { 107 # uses <nixpkgs> (meta.nixpkgs) 108 }; 109 110 node-b = 111 { pkgs, ... }: 112 { 113 # uses <special-nixpkgs> (meta.nodeNixpkgs.node-b) 114 }; 115} 116```