Adding HP Printer - "/nix/store/.../lib/cups/filter/hpps not available: No such file or directory"

I try to add a network printer HP M577dn (via Windows smb://). I tried to add it via CUPS cli, CUPS web-interface and system-config-printer, but it gives me always an error:

“/nix/store/d4h0dy01pv9vwwmrs51x8grgxr5blkw0-cups-progs/lib/cups/filter/hpps” not available: No such file or directory

I added hplip package to the configuration.nix, so the driver should be avialable:

[xxx@nixos:~]$ hp-
hp-align               hp-levels              hp-sendfax
hp-check               hp-linefeedcal         hp-setup
hp-clean               hp-logcapture          hp-systray
hp-colorcal            hp-makecopies          hp-testpage
hp-config_usb_printer  hp-makeuri             hp-timedate
hp-devicesettings      hp-pkservice           hp-toolbox
hp-diagnose_plugin     hp-plugin              hp-uiscan
hp-diagnose_queues     hp-pqdiag              hp-uninstall
hp-doctor              hp-print               hp-unload
hp-fab                 hp-printsettings       hp-upgrade
hp-faxsetup            hp-probe               hp-wificonfig
hp-firmware            hp-query               
hp-info                hp-scan                

[xxx@nixos:~]$ hp-print

HP Linux Imaging and Printing System (ver. 3.23.3)
Print Utility ver. 4.0

Also, in CUPS i see only very few drivers

[xxx@nixos:~]$ lpinfo -m | grep 'HP'
drv:///cupsfilters.drv/dsgnjt600pcl.ppd HP DesignJet 600 pcl, 1.0
drv:///cupsfilters.drv/dsgnjt750cpcl.ppd HP DesignJet 750c pcl, 1.0
drv:///cupsfilters.drv/dsgnjt1050cpcl.ppd HP DesignJet 1050c pcl, 1.0
drv:///cupsfilters.drv/dsgnjt4000pcl.ppd HP DesignJet 4000 pcl, 1.0
drv:///cupsfilters.drv/dsgnjtt790pcl.ppd HP DesignJet T790 pcl, 1.0
drv:///cupsfilters.drv/dsgnjtt1100pcl.ppd HP DesignJet T1100 pcl, 1.0
drv:///sample.drv/deskjet.ppd HP DeskJet Series
drv:///sample.drv/laserjet.ppd HP LaserJet Series PCL 4/5

Anybody can help how to further proceed? Any help is welcome!
I looked at Printing - NixOS Wiki but didn’t found a solution…

I finally was able to configure the printer in configuration.nix

  # Printer Configuration
  hardware.printers.ensureDefaultPrinter = "choosen-name";
  hardware.printers.ensurePrinters = [{
    name = "choosen-name"";
    deviceUri = "smb://domain..."; # <- Set print URI here
    #description = "";
    #location = "";
    model = "HP/hp-color_laserjet_mfp_m577-ps.ppd.gz"; # <- Not sure how to find out what is available
    ppdOptions = {
      Duplex = "DuplexNoTumble";
      PageSize = "A4";
      auth-info-required = "username,password"; # <- Literly the string "username,password" (do not provide actual username and password here! You will be asced when you print)
  services.printing = {
    enable = true;
    drivers = with pkgs; [ gutenprint hplip splix ];
    #extraConf = ''
    #  DefaultAuthType Negotiate
  services.system-config-printer.enable = true;
  programs.system-config-printer.enable = true;

I found that running ls /nix/store/*-hplip-*/share/cups/model/HP/ on the command line gives you a list of available model= values.

1 Like