anchor.diff:        { source = "${networkmanager_openconnect}/etc/NetworkManager/VPN/nm-openconnect-service.name";
           target = "NetworkManager/VPN/nm-openconnect-service.name";
         }
  -    ] ++ pkgs.lib.optional (cfg.overrideNameservers || cfg.appendNameservers)
  +    ] ++ pkgs.lib.optional (cfg.appendNameservers == [] || cfg.insertNameservers == [])
              { source = overrideNameserversScript;
                target = "NetworkManager/dispatcher.d/02overridedns";
              };
  
positive.code:     fi
    '';
  
    overrideNameserversScript = writeScript "02overridedns" ''
      #!/bin/sh
      ${optionalString cfg.overrideNameservers "${gnused}/bin/sed -i '/nameserver /d' /etc/resolv.conf"}
      ${concatStrings (map (s: ''
        ${optionalString cfg.appendNameservers
          "${gnused}/bin/sed -i '/nameserver ${s}/d' /etc/resolv.conf"
        }
        echo 'nameserver ${s}' >> /etc/resolv.conf
      '') config.networking.nameservers)}
    '';
  
  in {
  
negative.code:         apply = list: [ networkmanager modemmanager wpa_supplicant ] ++ list;
        };
  
        appendNameservers = mkOption {
          type = types.listOf types.string;
          default = [];
          description = ''
            A list of name servers that should be appended
            to the ones configured in NetworkManager or received by DHCP.
          '';
        };
  
        insertNameservers = mkOption {
          type = types.listOf types.string;
          default = [];
          description = ''
            A list of name servers that should be inserted before
            the ones configured in NetworkManager or received by DHCP.
          '';
        };
  
  