about summary refs log tree commit diff
path: root/lib/call-network.nix
Commit message (Collapse)AuthorAgeFilesLines
* lib/call-network: Only use primopsaszlig2018-04-031-18/+12
| | | | | | | | After looking at that expression again, it turns out that we actually don't even need to use __withPkgsPath, because all of the functionality in there can be done using primops only. Signed-off-by: aszlig <aszlig@nix.build>
* Fix up call-network and rename withPkgsPathaszlig2018-04-031-13/+18
| | | | | | | | | | | | | Using __withPkgsPath is a way better name, because two underscores in front of it commonly designate an internal attribute, which it is. The callNetwork function now works in a similar vain as callMachine, having a canonical way to specify the path to nixpkgs. I've also changed the recursive search of machines to use the __withPkgsPath attribute as a way to detect whether it's a machine. Signed-off-by: aszlig <aszlig@nix.build>
* lib/call-machine: Get rid of extraConfig attributeaszlig2016-05-031-6/+4
| | | | | | | | | | | | Right now we're not using the system attribute at all and we can still use nixpkgs.system to set the attribute for a particular machine. So we now can pass configuration attributes to the second argument of callMachine *directly* instead of using specific subattributes, which I think feels is a more natural way so users don't need to look up that "extraConfig" is for adding configuration values. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* lib/call-network: Pass nodes attribute to modulesaszlig2016-05-031-11/+17
| | | | | | | | | | | On NixOps as well as for NixOS test networks, there is a nodes attribute which allows to reference configuration definitions from other modules. Currently this isn't used at all but might come in handy if we want to cross-reference machine configurations (for example referencing IP addresses in a static network configuration). Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* lib: Move callNetwork into its own fileaszlig2016-05-031-0/+15
Just to keep the default.nix clean and easy to read. Signed-off-by: aszlig <aszlig@redmoonstudios.org>