* Expose networking.interfaces as an attribute set keyed on the

interface name through the derived option networking.ifaces.  This
  makes it easier to get information about specific interfaces
  (e.g. `nodes.router.config.networking.ifaces.eth2.ipAddress').
  Really networking.interfaces should be an attribute set.

svn path=/nixos/trunk/; revision=21938
This commit is contained in:
Eelco Dolstra
2010-05-21 14:12:03 +00:00
parent 3c7a6eb53c
commit fa183e5472
3 changed files with 16 additions and 4 deletions

View File

@@ -117,6 +117,16 @@ in
};
networking.ifaces = mkOption {
default = listToAttrs
(map (iface: { name = iface.name; value = iface; }) config.networking.interfaces);
internal = true;
description = ''
The network interfaces in <option>networking.interfaces</option>
as an attribute set keyed on the interface name.
'';
};
};