# Pastebin Np6RjPJE { pkgs, ... }: let inherit (builtins) readFile; model = "$out/share/cups/model/HP/hp-envy_5000_series.ppd.gz"; hplip = pkgs.runCommandNoCC "hplip" { buildInputs = with pkgs; [ gzip gnused ]; } '' cp -r ${pkgs.hplip} $out zcat ${model} | \ sed 's!Custom!Other!g' | \ gzip > tmp chmod -R u+rw $out mv tmp ${model} ''; in { imports = [ ./sane-extra-config.nix ]; services.printing = { enable = true; drivers = [ hplip ]; }; hardware.printers = { ensureDefaultPrinter = "Envy"; ensurePrinters = [{ name = "Envy"; description = "HP Envy 5030"; deviceUri = "socket://192.168.178.41"; location = "Office"; model = "HP/hp-envy_5000_series.ppd.gz"; ppdOptions = { PageSize = "A4"; ColorModel = "RGB"; MediaType = "Plain"; OutputMode = "Normal"; Duplex = "DuplexNoTumble"; }; }]; }; hardware.sane = { enable = true; extraBackends = [ pkgs.hplipWithPlugin ]; }; }