diff options
| author | Mel <mel@rnrd.eu> | 2025-08-31 17:46:49 +0200 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2025-08-31 17:46:49 +0200 |
| commit | 3c3b377004464e944548003aa49d897088f3589a (patch) | |
| tree | 302b62bc48fe43c7541c74d0ffa7aa97405d00db /modules/foundation/services/networks.nix | |
| parent | fcbc0446f11b8555c1204081c23fbd1442534aa0 (diff) | |
| download | network-3c3b377004464e944548003aa49d897088f3589a.tar.zst network-3c3b377004464e944548003aa49d897088f3589a.zip | |
Add MTU option to foundation service network options
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'modules/foundation/services/networks.nix')
| -rw-r--r-- | modules/foundation/services/networks.nix | 12 |
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} ''; |
