anchor.diff:      ''; # */
     };
   
  +  hwdbBin = stdenv.mkDerivation {
  +    name = "hwdb.bin";
  +
  +    preferLocalBuild = true;
  +    allowSubstitutes = false;
  +
  +    buildCommand = ''
  +      mkdir -p etc/udev/hwdb.d
  +      for i in ${toString ([udev] ++ cfg.packages)}; do
  +        echo "Adding hwdb files for package $i"
  +        for j in $i/{etc,lib}/udev/hwdb.d/*; do
  +          ln -s $j etc/udev/hwdb.d/$(basename $j)
  +        done
  +      done
  +
  +      echo "Generating hwdb database..."
  +      ${udev}/bin/udevadm hwdb --update --root=$(pwd)
  +      mv etc/udev/hwdb.bin $out
  +    '';
  +  };
  +
     # Udev has a 512-character limit for ENV{PATH}, so create a symlink
     # tree to work around this.
     udevPath = pkgs.buildEnv {
  
positive.code: 
      services.udev.extraRules = nixosRules;
  
      services.udev.packages = [ extraUdevRules ];
  
      services.udev.path = [ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.utillinux udev ];
  
      environment.etc =
        [ { source = udevRules;
            target = "udev/rules.d";
          }
        ];
  
  
negative.code:           echo "" > /proc/sys/kernel/hotplug
          fi
  
          # Allow the kernel to find our firmware.
          if [ -e /sys/module/firmware_class/parameters/path ]; then
            echo -n "${config.hardware.firmware}/lib/firmware" > /sys/module/firmware_class/parameters/path
  