fix: lw5xl install process, add: HP Deskjet 2800
This commit is contained in:
parent
69eff28b09
commit
2fce9fd507
|
@ -1,17 +1,29 @@
|
|||
{pkgs, ...}: {
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "HP_DeskJet_2800_series_276B08";
|
||||
description = "HP DeskJet 2800 series";
|
||||
location = "Local Printer";
|
||||
deviceUri = "dnssd://HP%20DeskJet%202800%20series%20%5B276B08%5D._ipp._tcp.local/?uuid=5e8778d6-018e-48ec-8838-c8cf40170b95";
|
||||
model = "drv:///hp/hpcups.drv/hp-Deskjet_2800_series.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
name = "DYMO_Label_Writer_5XL_on_DYMOLW5XL315c26E";
|
||||
description = "DYMO LabelWriter 5XL";
|
||||
location = "Local Printer";
|
||||
deviceUri = "dnssd://DYMO%20Label%20Writer%205XL%20on%20DYMOLW5XL315c26E._pdl-datastream._tcp.local/";
|
||||
model = "lw5xl.ppd";
|
||||
model = "53hwxkc5kmnm06xvkx8f6w3dcsh7jlhg-lw5xl.ppd";
|
||||
ppdOptions = {
|
||||
DymoPrintQuality = "Graphics";
|
||||
};
|
||||
}
|
||||
];
|
||||
ensureDefaultPrinter = "DYMO_Label_Writer_5XL_on_DYMOLW5XL315c26E";
|
||||
ensureDefaultPrinter = "HP_DeskJet_2800_series_276B08";
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
|
@ -23,8 +35,8 @@
|
|||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [
|
||||
pkgs.cups-dymo
|
||||
(pkgs.writeTextDir "share/cups/model/lw5xl.ppd" (builtins.readFile ./lw5xl.ppd))
|
||||
pkgs.hplipWithPlugin
|
||||
(pkgs.callPackage ./lw5xl.nix {})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
18
nixos/fuchsia/services/printer/lw5xl.nix
Normal file
18
nixos/fuchsia/services/printer/lw5xl.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{stdenv}: let
|
||||
lw5xl = ./lw5xl.ppd;
|
||||
raster2dymolw_v2 = ./raster2dymolw_v2;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "lw5xw-${version}";
|
||||
version = "1.0";
|
||||
|
||||
src = ./.;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/cups/model/
|
||||
cp ${lw5xl} $out/share/cups/model/
|
||||
|
||||
mkdir -p $out/lib/cups/filter/
|
||||
cp ${raster2dymolw_v2} $out/lib/cups/filter/raster2dymolw_v2
|
||||
'';
|
||||
}
|
|
@ -1,7 +1,5 @@
|
|||
# This file defines overlays
|
||||
{inputs, ...}: let
|
||||
raster2dymolw_v2 = ./raster2dymolw_v2;
|
||||
in {
|
||||
{inputs, ...}: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs final.pkgs;
|
||||
|
||||
|
@ -12,12 +10,6 @@ in {
|
|||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||
# ...
|
||||
# });
|
||||
cups-dymo = prev.cups-dymo.overrideAttrs (oldAttrs: {
|
||||
installPhase = ''
|
||||
installPhase
|
||||
cp ${raster2dymolw_v2} $out/lib/cups/filter/raster2dymolw_v2
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
|
|
Loading…
Reference in a new issue