2024-05-07 23:31:41 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-04-10 16:51:28 +02:00
|
|
|
let
|
2024-05-11 22:55:59 +02:00
|
|
|
inherit (config.grimmShared) enable printing graphical;
|
2024-04-10 16:51:28 +02:00
|
|
|
in
|
|
|
|
{
|
2024-05-11 22:55:59 +02:00
|
|
|
config = lib.mkIf (enable && printing) {
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
services.printing.enable = true;
|
|
|
|
services.printing.drivers = with pkgs; [
|
|
|
|
brgenml1lpr
|
|
|
|
brgenml1cupswrapper
|
|
|
|
];
|
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
2024-05-07 23:31:41 +02:00
|
|
|
};
|
2024-05-11 22:55:59 +02:00
|
|
|
services.printing.cups-pdf.enable = true;
|
|
|
|
hardware.sane.brscan4.enable = true; # enables support for SANE scanners
|
|
|
|
|
|
|
|
environment.systemPackages = (
|
|
|
|
lib.optionals graphical [
|
|
|
|
pkgs.kdePackages.skanpage
|
|
|
|
# libsForQt5.skanpage
|
|
|
|
]
|
|
|
|
);
|
|
|
|
};
|
2024-04-16 12:09:17 +02:00
|
|
|
|
2024-04-26 22:03:03 +02:00
|
|
|
options.grimmShared.printing = lib.mkEnableOption "Enables print and scan related options";
|
2024-03-24 16:59:47 +01:00
|
|
|
}
|