Skip to content

Commit 0ca1faa

Browse files
committed
net.nix: allow no nodes net
1 parent 9c534fe commit 0ca1faa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

nix/net.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ in
7878
# Compute the definitions of the machines.
7979
nodes = mkOption {
8080
description = "The NixOS configurations for the nodes in the network.";
81-
type = types.attrsOf (import "${config.nixpkgs}/nixos/lib/eval-config.nix" {
81+
default = { };
82+
# on 1st eval nodes is not read and on 2nd lib is taken from config.nixpkgs
83+
type = types.attrsOf (lib.nixosSystem or (import /${config.nixpkgs}/nixos/lib/eval-config.nix) {
8284
inherit system lib;
8385
specialArgs = {
8486
inherit (config) resources;

0 commit comments

Comments
 (0)