anchor.diff:            echo "" > /proc/sys/kernel/hotplug
           fi
   
  -        # Regenerate the hardware database /var/lib/udev/hwdb.bin
  -        # whenever systemd changes.
  -        if [ ! -e /var/lib/udev/prev-systemd -o "$(readlink /var/lib/udev/prev-systemd)" != ${config.systemd.package} ]; then
  -          echo "regenerating udev hardware database..."
  -          ${config.systemd.package}/bin/udevadm hwdb --update && ln -sfn ${config.systemd.package} /var/lib/udev/prev-systemd
  -        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
  
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:           Additional <command>udev</command> rules. They'll be written
            into file <filename>10-local.rules</filename>. Thus they are
            read before all other rules.
          '';
        };
  
        extraHwdb = mkOption {
          default = "";
          example = ''
            evdev:input:b0003v05AFp8277*
              KEYBOARD_KEY_70039=leftalt
              KEYBOARD_KEY_700e2=leftctrl
          '';
          type = types.lines;
          description = ''
            Additional <command>hwdb</command> files. They'll be written
            into file <filename>10-local.hwdb</filename>. Thus they are
            read before all other files.
          '';
        };
  
  