I have an HP DeskJet 1510 printer/scanner.
I followed the wiki on Printing and Scanners but no luck after adding pkgs.hplipWithPlugin
,
services.printing.enable = true;
services.printing.drivers = [ pkgs.hplipWithPlugin ];
hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
After a reboot, the Simple Scan app in Gnome does not show the scanner for use.
I tried running the following but get an error:
$ sudo -i
# nix run nixpkgs.hplipWithPlugin -c hp-setup
error: Package ‘hplip-3.19.6’ in /nix/store/8v0n7zn9hpmqays85zwibyfivr4ddyy4-nixos-19.09.1778.db3e8325a9b/nixos/pkgs/misc/drivers/hplip/default.nix:222 has an unfree license (‘unfree’), refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)
However, I do have allowUnfree = true
in my configuration.nix
.
Then I tried opening up localhost:631
in my browser, and I was able to add the printer there. I can also see the printer in Settings > Devices > Printers.
However, I still can not scan with the Simple Scan
app.
When I try
$ nix-shell -p sane-backends
$ scanimage -L
device `v4l:/dev/video0' is a Noname Integrated_Webcam_HD: Integrate virtual device
it is looking for my webcam. When I tried it as root, there was more output:
# scanimage -L
Created directory: /var/lib/net-snmp
Created directory: /var/lib/net-snmp/mib_indexes
device `v4l:/dev/video0' is a Noname Integrated_Webcam_HD: Integrate virtual device
Looks like it ends the same. Side question, is it okay for it to create those directories that aren’t managed by Nix? Should I delete them?
Any ideas?