summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces.nix
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-11-26 15:42:32 -0800
committerWilliam A. Kennington III <william@wkennington.com>2014-11-26 16:29:24 -0800
commitfbe9ac05d36380159a80bb98307246323aea422c (patch)
tree87bc39ba260e327ec79e64c6d27a2a4f37df0951 /nixos/modules/tasks/network-interfaces.nix
parent1860ee27b0e4aae2cc0ed997e14b0d3289ce498f (diff)
downloadnixpkgs-fbe9ac05d36380159a80bb98307246323aea422c.tar
nixpkgs-fbe9ac05d36380159a80bb98307246323aea422c.tar.gz
nixpkgs-fbe9ac05d36380159a80bb98307246323aea422c.tar.bz2
nixpkgs-fbe9ac05d36380159a80bb98307246323aea422c.tar.lz
nixpkgs-fbe9ac05d36380159a80bb98307246323aea422c.tar.xz
nixpkgs-fbe9ac05d36380159a80bb98307246323aea422c.tar.zst
nixpkgs-fbe9ac05d36380159a80bb98307246323aea422c.zip
nixos/network-interfaces: Add maclvan support
Diffstat (limited to 'nixos/modules/tasks/network-interfaces.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 080cb559cbb..f853d61cea4 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -428,6 +428,37 @@ in
       };
     };
 
+    networking.macvlans = mkOption {
+      type = types.attrsOf types.optionSet;
+      default = { };
+      example = {
+        wan = {
+          interface = "enp2s0";
+          mode = "vepa";
+        };
+      };
+      description = ''
+        This option allows you to define macvlan interfaces which should
+        be automatically created.
+      '';
+      options = {
+
+        interface = mkOption {
+          example = "enp4s0";
+          type = types.string;
+          description = "The interface the macvlan will transmit packets through.";
+        };
+
+        mode = mkOption {
+          default = null;
+          type = types.nullOr types.str;
+          example = "vepa";
+          description = "The mode of the macvlan device.";
+        };
+
+      };
+    };
+
     networking.sits = mkOption {
       type = types.attrsOf types.optionSet;
       default = { };