about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-28 19:47:40 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-28 22:45:57 +0100
commitdbefab9cf42c09444dd2554380104096969c0728 (patch)
tree7b3f8a5dbaebfb7fc41cb12e22aaa4ad1cddc542
parent92ef9d6b4653362dc9d0cbacdec863e7d41674cd (diff)
downloadnixlib-dbefab9cf42c09444dd2554380104096969c0728.tar
nixlib-dbefab9cf42c09444dd2554380104096969c0728.tar.gz
nixlib-dbefab9cf42c09444dd2554380104096969c0728.tar.bz2
nixlib-dbefab9cf42c09444dd2554380104096969c0728.tar.lz
nixlib-dbefab9cf42c09444dd2554380104096969c0728.tar.xz
nixlib-dbefab9cf42c09444dd2554380104096969c0728.tar.zst
nixlib-dbefab9cf42c09444dd2554380104096969c0728.zip
Do not allow multiple definitions of IP addresses etc. within an interface
-rw-r--r--nixos/modules/tasks/network-interfaces.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 0767c3db1fec..16671cb37437 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -14,14 +14,14 @@ let
 
       name = mkOption {
         example = "eth0";
-        type = types.string;
+        type = types.uniq types.string;
         description = "Name of the interface.";
       };
 
       ipAddress = mkOption {
         default = null;
         example = "10.0.0.1";
-        type = types.nullOr types.string;
+        type = types.nullOr (types.uniq types.string);
         description = ''
           IP address of the interface.  Leave empty to configure the
           interface using DHCP.
@@ -41,7 +41,7 @@ let
       subnetMask = mkOption {
         default = "";
         example = "255.255.255.0";
-        type = types.string;
+        type = types.uniq types.string;
         description = ''
           Subnet mask of the interface, specified as a bitmask.
           This is deprecated; use <option>prefixLength</option>
@@ -52,7 +52,7 @@ let
       macAddress = mkOption {
         default = null;
         example = "00:11:22:33:44:55";
-        type = types.nullOr types.string;
+        type = types.nullOr (types.uniq types.string);
         description = ''
           MAC address of the interface. Leave empty to use the default.
         '';