anchor.diff:          mode = mkOption {
             default = null;
             example = "active-backup";
  -          type = types.nullOr types.string;
  +          type = types.nullOr types.str;
             description = ''
               The mode which the bond will be running. The default mode for
               the bonding driver is balance-rr, optimizing for throughput.
               More information about valid modes can be found at
               https://www.kernel.org/doc/Documentation/networking/bonding.txt
  +          '';
  +        };
  +
  +        xmit_hash_policy = mkOption {
  +          default = null;
  +          example = "layer2+3";
  +          type = types.nullOr types.str;
  +          description = ''
  +            Selects the transmit hash policy to use for slave selection in
  +            balance-xor, 802.3ad, and tlb modes.
             '';
           };
   
  
positive.code: 
          interfaces = mkOption {
            example = [ "enp4s0f0" "enp4s0f1" "wlan0" ];
            type = types.listOf types.string;
            description = "The interfaces to bond together";
          };
  
          miimon = mkOption {
  
negative.code:               while [ ! -d /sys/class/net/${n} ]; do sleep 0.1; done;
  
                # Set the miimon and mode options
                ${optionalString (v.lacp_rate != null)
                  "echo \"${v.lacp_rate}\" > /sys/class/net/${n}/bonding/lacp_rate"}
                ${optionalString (v.miimon != null)
                  "echo ${toString v.miimon} > /sys/class/net/${n}/bonding/miimon"}
                ${optionalString (v.mode != null)
                  "echo \"${v.mode}\" > /sys/class/net/${n}/bonding/mode"}
                ${optionalString (v.xmit_hash_policy != null)
                  "echo \"${v.xmit_hash_policy}\" > /sys/class/net/${n}/bonding/xmit_hash_policy"}
  
                # Bring up the bridge and enslave the specified interfaces
                ip link set "${n}" up
  