2025-12-27 22:22:54 +01:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
let
|
2026-02-07 16:40:32 +01:00
|
|
|
hp-driver = pkgs.hplipWithPlugin;
|
2025-12-27 22:22:54 +01:00
|
|
|
in
|
|
|
|
|
{
|
2019-04-19 03:11:51 +02:00
|
|
|
services.printing = {
|
|
|
|
|
enable = true;
|
2025-12-27 22:22:54 +01:00
|
|
|
drivers = [ hp-driver ];
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
|
2026-02-07 16:40:32 +01:00
|
|
|
hardware.sane = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraBackends = [ hp-driver ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-18 17:36:12 +02:00
|
|
|
environment.systemPackages = [
|
|
|
|
|
pkgs.system-config-printer
|
2026-02-07 16:40:32 +01:00
|
|
|
pkgs.simple-scan
|
|
|
|
|
hp-driver
|
2022-07-18 17:36:12 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# allow connecting to .local printers
|
2026-02-07 16:40:32 +01:00
|
|
|
services.avahi = {
|
|
|
|
|
nssmdns4 = true;
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-17 21:43:08 +01:00
|
|
|
# users.users.me.extraGroups is set in configs/default.nix which defines the "me" user
|
2022-07-18 17:36:12 +02:00
|
|
|
|
2022-03-10 21:52:12 +01:00
|
|
|
hardware.printers.ensurePrinters = [
|
|
|
|
|
{
|
|
|
|
|
name = "OfficeJet";
|
|
|
|
|
location = "Zimmer";
|
2025-12-25 14:00:03 +01:00
|
|
|
deviceUri = "https://${pkgs.lib.niveum.localAddresses.officejet}";
|
2022-03-10 21:52:12 +01:00
|
|
|
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
|
|
|
/*
|
2025-12-27 22:22:54 +01:00
|
|
|
HP/hp-officejet_4650_series.ppd.gz
|
|
|
|
|
drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd
|
2022-07-19 21:34:43 +02:00
|
|
|
*/
|