summaryrefslogtreecommitdiff
path: root/modules/foundation/services
diff options
context:
space:
mode:
Diffstat (limited to 'modules/foundation/services')
-rw-r--r--modules/foundation/services/networks.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/foundation/services/networks.nix b/modules/foundation/services/networks.nix
index d1f1a92..e9adf6b 100644
--- a/modules/foundation/services/networks.nix
+++ b/modules/foundation/services/networks.nix
@@ -13,6 +13,7 @@ let
types
assertMsg
optional
+ optionalString
getExe
concatStringsSep
filterAttrs
@@ -65,6 +66,16 @@ in
description = "Docker network driver to use";
};
+ mtu = mkOption {
+ type = types.nullOr types.int;
+ default = null;
+ example = 1400;
+ description = ''
+ The MTU for this network.
+ If null, we use the Docker default.
+ '';
+ };
+
options = mkOption {
type = types.listOf types.str;
default = [ ];
@@ -195,6 +206,7 @@ in
--ipv6 \
--subnet=${subnet} \
--driver=${network.driver} \
+ ${optionalString (network.mtu != null) "--opt com.docker.network.driver.mtu=${toString network.mtu}"} \
${options} \
${name}
'';