@@ -560,101 +560,102 @@ in
560
560
561
561
} ;
562
562
563
- networking . bonds = mkOption {
564
- default = { } ;
565
- example = literalExample {
566
- bond0 = {
567
- interfaces = [ "eth0" "wlan0" ] ;
568
- miimon = 100 ;
563
+ networking . bonds =
564
+ let
565
+ driverOptionsExample = {
566
+ miimon = "100" ;
569
567
mode = "active-backup" ;
570
568
} ;
571
- fatpipe . interfaces = [ "enp4s0f0" "enp4s0f1" "enp5s0f0" "enp5s0f1" ] ;
572
- } ;
573
- description = ''
574
- This option allows you to define bond devices that aggregate multiple,
575
- underlying networking interfaces together. The value of this option is
576
- an attribute set. Each attribute specifies a bond, with the attribute
577
- name specifying the name of the bond's network interface
578
- '' ;
569
+ in mkOption {
570
+ default = { } ;
571
+ example = literalExample {
572
+ bond0 = {
573
+ interfaces = [ "eth0" "wlan0" ] ;
574
+ driverOptions = driverOptionsExample ;
575
+ } ;
576
+ anotherBond . interfaces = [ "enp4s0f0" "enp4s0f1" "enp5s0f0" "enp5s0f1" ] ;
577
+ } ;
578
+ description = ''
579
+ This option allows you to define bond devices that aggregate multiple,
580
+ underlying networking interfaces together. The value of this option is
581
+ an attribute set. Each attribute specifies a bond, with the attribute
582
+ name specifying the name of the bond's network interface
583
+ '' ;
579
584
580
- type = with types ; attrsOf ( submodule {
585
+ type = with types ; attrsOf ( submodule {
581
586
582
- options = {
587
+ options = {
583
588
584
- interfaces = mkOption {
585
- example = [ "enp4s0f0" "enp4s0f1" "wlan0" ] ;
586
- type = types . listOf types . str ;
587
- description = "The interfaces to bond together" ;
588
- } ;
589
+ interfaces = mkOption {
590
+ example = [ "enp4s0f0" "enp4s0f1" "wlan0" ] ;
591
+ type = types . listOf types . str ;
592
+ description = "The interfaces to bond together" ;
593
+ } ;
594
+
595
+ driverOptions = mkOption {
596
+ type = types . attrsOf types . str ;
597
+ default = { } ;
598
+ example = literalExample driverOptionsExample ;
599
+ description = ''
600
+ Options for the bonding driver.
601
+ Documentation can be found in
602
+ <link xlink:href="https://www.kernel.org/doc/Documentation/networking/bonding.txt" />
603
+ '' ;
589
604
590
- driverOptions = mkOption {
591
- type = types . attrsOf types . str ;
592
- default = { } ;
593
- example = literalExample {
594
- interfaces = [ "eth0" "wlan0" ] ;
595
- miimon = 100 ;
596
- mode = "active-backup" ;
597
605
} ;
598
- description = ''
599
- Options for the bonding driver.
600
- Documentation can be found in
601
- <link xlink:href="https://www.kernel.org/doc/Documentation/networking/bonding.txt" />
602
- '' ;
603
606
604
- } ;
607
+ lacp_rate = mkOption {
608
+ default = null ;
609
+ example = "fast" ;
610
+ type = types . nullOr types . str ;
611
+ description = ''
612
+ DEPRECATED, use `driverOptions`.
613
+ Option specifying the rate in which we'll ask our link partner
614
+ to transmit LACPDU packets in 802.3ad mode.
615
+ '' ;
616
+ } ;
605
617
606
- lacp_rate = mkOption {
607
- default = null ;
608
- example = "fast" ;
609
- type = types . nullOr types . str ;
610
- description = ''
611
- DEPRECATED, use `driverOptions`.
612
- Option specifying the rate in which we'll ask our link partner
613
- to transmit LACPDU packets in 802.3ad mode.
614
- '' ;
615
- } ;
618
+ miimon = mkOption {
619
+ default = null ;
620
+ example = 100 ;
621
+ type = types . nullOr types . int ;
622
+ description = ''
623
+ DEPRECATED, use `driverOptions`.
624
+ Miimon is the number of millisecond in between each round of polling
625
+ by the device driver for failed links. By default polling is not
626
+ enabled and the driver is trusted to properly detect and handle
627
+ failure scenarios.
628
+ '' ;
629
+ } ;
616
630
617
- miimon = mkOption {
618
- default = null ;
619
- example = 100 ;
620
- type = types . nullOr types . int ;
621
- description = ''
622
- DEPRECATED, use `driverOptions`.
623
- Miimon is the number of millisecond in between each round of polling
624
- by the device driver for failed links. By default polling is not
625
- enabled and the driver is trusted to properly detect and handle
626
- failure scenarios.
627
- '' ;
628
- } ;
631
+ mode = mkOption {
632
+ default = null ;
633
+ example = "active-backup" ;
634
+ type = types . nullOr types . str ;
635
+ description = ''
636
+ DEPRECATED, use `driverOptions`.
637
+ The mode which the bond will be running. The default mode for
638
+ the bonding driver is balance-rr, optimizing for throughput.
639
+ More information about valid modes can be found at
640
+ https://www.kernel.org/doc/Documentation/networking/bonding.txt
641
+ '' ;
642
+ } ;
629
643
630
- mode = mkOption {
631
- default = null ;
632
- example = "active-backup" ;
633
- type = types . nullOr types . str ;
634
- description = ''
635
- DEPRECATED, use `driverOptions`.
636
- The mode which the bond will be running. The default mode for
637
- the bonding driver is balance-rr, optimizing for throughput.
638
- More information about valid modes can be found at
639
- https://www.kernel.org/doc/Documentation/networking/bonding.txt
640
- '' ;
641
- } ;
644
+ xmit_hash_policy = mkOption {
645
+ default = null ;
646
+ example = "layer2+3" ;
647
+ type = types . nullOr types . str ;
648
+ description = ''
649
+ DEPRECATED, use `driverOptions`.
650
+ Selects the transmit hash policy to use for slave selection in
651
+ balance-xor, 802.3ad, and tlb modes.
652
+ '' ;
653
+ } ;
642
654
643
- xmit_hash_policy = mkOption {
644
- default = null ;
645
- example = "layer2+3" ;
646
- type = types . nullOr types . str ;
647
- description = ''
648
- DEPRECATED, use `driverOptions`.
649
- Selects the transmit hash policy to use for slave selection in
650
- balance-xor, 802.3ad, and tlb modes.
651
- '' ;
652
655
} ;
653
656
654
- } ;
655
-
656
- } ) ;
657
- } ;
657
+ } ) ;
658
+ } ;
658
659
659
660
networking . macvlans = mkOption {
660
661
default = { } ;
0 commit comments