2020-12-05 13:48:06 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2020-10-18 22:25:05 +02:00
|
|
|
let
|
|
|
|
gutenprintWithVersion = "gutenprint.${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}";
|
|
|
|
in
|
2020-12-05 15:44:58 +01:00
|
|
|
lib.mkIf config.sbruder.gui.enable {
|
2020-08-30 13:20:57 +02:00
|
|
|
services = {
|
|
|
|
printing = {
|
|
|
|
enable = true;
|
|
|
|
drivers = with pkgs; [
|
|
|
|
gutenprint
|
2021-07-04 20:51:28 +02:00
|
|
|
] ++ lib.optional config.sbruder.unfree.allowSoftware (unstable.cups-kyocera-ecosys-m552x-p502x.override {
|
|
|
|
# in Kyocera terms, EU means duplex enabled by default
|
|
|
|
region = "EU";
|
|
|
|
});
|
2020-08-30 13:20:57 +02:00
|
|
|
};
|
|
|
|
avahi.enable = true;
|
2020-08-29 23:54:35 +02:00
|
|
|
};
|
2020-10-18 22:25:05 +02:00
|
|
|
|
|
|
|
hardware.printers.ensurePrinters = [
|
|
|
|
{
|
|
|
|
name = "ich_drucke_nicht";
|
|
|
|
deviceUri = "socket://192.168.178.26";
|
|
|
|
model = "${gutenprintWithVersion}://bjc-TS3100-series/expert";
|
|
|
|
}
|
2021-07-04 20:51:28 +02:00
|
|
|
] ++ lib.optionals config.sbruder.unfree.allowSoftware [
|
|
|
|
{
|
|
|
|
name = "elma";
|
|
|
|
deviceUri = "socket://elma.home.sbruder.de";
|
|
|
|
model = "Kyocera/Kyocera ECOSYS P5021cdn.PPD";
|
|
|
|
}
|
2020-10-18 22:25:05 +02:00
|
|
|
];
|
2020-08-22 17:44:39 +02:00
|
|
|
}
|