1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/configs/printing.nix

43 lines
987 B
Nix
Raw Normal View History

2022-03-10 21:52:12 +01:00
{pkgs, ...}: let
2020-10-24 13:27:36 +02:00
inherit (import <niveum/lib>) localAddresses;
hp-driver = pkgs.hplipWithPlugin;
2020-06-10 17:37:25 +02:00
in {
2019-04-19 03:11:51 +02:00
services.printing = {
enable = true;
2022-03-10 21:52:12 +01:00
drivers = [hp-driver];
2019-04-19 03:11:51 +02:00
};
2020-01-21 08:40:10 +01:00
hardware.sane = {
enable = true;
2022-03-10 21:52:12 +01:00
extraBackends = [hp-driver];
2020-01-21 08:40:10 +01:00
};
environment.systemPackages = [
pkgs.system-config-printer
];
# allow connecting to .local printers
services.avahi.nssmdns = true;
2022-03-10 21:52:12 +01:00
hardware.printers.ensurePrinters = [
{
name = "OfficeJet";
location = "Zimmer";
deviceUri = "https://${localAddresses.officejet}";
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
ppdOptions = {
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
PageSize = "A4"; # A4 A4.FB A4.Duplex
MediaType = "Plain";
OutputMode = "Normal";
ColorModel = "KGray"; # RGB CMYGray KGray
};
}
];
2019-04-19 03:11:51 +02:00
}
2022-03-10 21:52:12 +01:00
/*
2022-07-19 21:34:43 +02:00
HP/hp-officejet_4650_series.ppd.gz
drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd
*/
2019-10-26 13:30:12 +02:00