about summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces-scripted.nix
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2021-08-11 12:48:43 +0200
committertomberek <tomberek@users.noreply.github.com>2021-10-16 20:48:03 -0400
commitc1f515547109a7e1845120449676ba6aa9a78fe9 (patch)
tree487ec319ee52767d36bb80cb59f3e1a433c0324b /nixos/modules/tasks/network-interfaces-scripted.nix
parentf29ea2d15d833494f7e97e0231b03ca70a8e7db4 (diff)
downloadnixlib-c1f515547109a7e1845120449676ba6aa9a78fe9.tar
nixlib-c1f515547109a7e1845120449676ba6aa9a78fe9.tar.gz
nixlib-c1f515547109a7e1845120449676ba6aa9a78fe9.tar.bz2
nixlib-c1f515547109a7e1845120449676ba6aa9a78fe9.tar.lz
nixlib-c1f515547109a7e1845120449676ba6aa9a78fe9.tar.xz
nixlib-c1f515547109a7e1845120449676ba6aa9a78fe9.tar.zst
nixlib-c1f515547109a7e1845120449676ba6aa9a78fe9.zip
nixos/networking: support FOU encapsulation for sits
Diffstat (limited to 'nixos/modules/tasks/network-interfaces-scripted.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces-scripted.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix
index 055580e3ea2f..e8e2de090b32 100644
--- a/nixos/modules/tasks/network-interfaces-scripted.nix
+++ b/nixos/modules/tasks/network-interfaces-scripted.nix
@@ -519,7 +519,12 @@ let
                 ${optionalString (v.remote != null) "remote \"${v.remote}\""} \
                 ${optionalString (v.local != null) "local \"${v.local}\""} \
                 ${optionalString (v.ttl != null) "ttl ${toString v.ttl}"} \
-                ${optionalString (v.dev != null) "dev \"${v.dev}\""}
+                ${optionalString (v.dev != null) "dev \"${v.dev}\""} \
+                ${optionalString (v.encapsulation != null)
+                  "encap ${v.encapsulation.type} encap-dport ${toString v.encapsulation.port} ${
+                    optionalString (v.encapsulation.sourcePort != null)
+                      "encap-sport ${toString v.encapsulation.sourcePort}"
+                  }"}
               ip link set "${n}" up
             '';
             postStop = ''