Merge pull request #83633 from zarelit/fix_literalExample

network-interfaces: fix literalExample arguments
This commit is contained in:
Maximilian Bosch 2020-03-29 22:04:01 +02:00 committed by GitHub
commit f178f960b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -634,19 +634,23 @@ in
networking.bonds = networking.bonds =
let let
driverOptionsExample = { driverOptionsExample = ''
{
miimon = "100"; miimon = "100";
mode = "active-backup"; mode = "active-backup";
}; }
'';
in mkOption { in mkOption {
default = { }; default = { };
example = literalExample { example = literalExample ''
{
bond0 = { bond0 = {
interfaces = [ "eth0" "wlan0" ]; interfaces = [ "eth0" "wlan0" ];
driverOptions = driverOptionsExample; driverOptions = ${driverOptionsExample};
}; };
anotherBond.interfaces = [ "enp4s0f0" "enp4s0f1" "enp5s0f0" "enp5s0f1" ]; anotherBond.interfaces = [ "enp4s0f0" "enp4s0f1" "enp5s0f0" "enp5s0f1" ];
}; }
'';
description = '' description = ''
This option allows you to define bond devices that aggregate multiple, This option allows you to define bond devices that aggregate multiple,
underlying networking interfaces together. The value of this option is underlying networking interfaces together. The value of this option is
@ -731,12 +735,14 @@ in
networking.macvlans = mkOption { networking.macvlans = mkOption {
default = { }; default = { };
example = literalExample { example = literalExample ''
{
wan = { wan = {
interface = "enp2s0"; interface = "enp2s0";
mode = "vepa"; mode = "vepa";
}; };
}; }
'';
description = '' description = ''
This option allows you to define macvlan interfaces which should This option allows you to define macvlan interfaces which should
be automatically created. be automatically created.
@ -764,7 +770,8 @@ in
networking.sits = mkOption { networking.sits = mkOption {
default = { }; default = { };
example = literalExample { example = literalExample ''
{
hurricane = { hurricane = {
remote = "10.0.0.1"; remote = "10.0.0.1";
local = "10.0.0.22"; local = "10.0.0.22";
@ -775,7 +782,8 @@ in
dev = "enp3s0"; dev = "enp3s0";
ttl = 127; ttl = 127;
}; };
}; }
'';
description = '' description = ''
This option allows you to define 6-to-4 interfaces which should be automatically created. This option allows you to define 6-to-4 interfaces which should be automatically created.
''; '';
@ -826,7 +834,8 @@ in
networking.vlans = mkOption { networking.vlans = mkOption {
default = { }; default = { };
example = literalExample { example = literalExample ''
{
vlan0 = { vlan0 = {
id = 3; id = 3;
interface = "enp3s0"; interface = "enp3s0";
@ -835,7 +844,8 @@ in
id = 1; id = 1;
interface = "wlan0"; interface = "wlan0";
}; };
}; }
'';
description = description =
'' ''
This option allows you to define vlan devices that tag packets This option allows you to define vlan devices that tag packets
@ -868,7 +878,8 @@ in
networking.wlanInterfaces = mkOption { networking.wlanInterfaces = mkOption {
default = { }; default = { };
example = literalExample { example = literalExample ''
{
wlan-station0 = { wlan-station0 = {
device = "wlp6s0"; device = "wlp6s0";
}; };
@ -885,7 +896,8 @@ in
device = "wlp6s0"; device = "wlp6s0";
mac = "02:00:00:00:00:03"; mac = "02:00:00:00:00:03";
}; };
}; }
'';
description = description =
'' ''
Creating multiple WLAN interfaces on top of one physical WLAN device (NIC). Creating multiple WLAN interfaces on top of one physical WLAN device (NIC).