cups: Declaratively add printers

This commit is contained in:
Simon Bruder 2020-10-18 22:25:05 +02:00
parent 56b5b2f82c
commit 1244a6b5ed
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -1,5 +1,7 @@
{ pkgs, ... }: { lib, pkgs, ... }:
let
gutenprintWithVersion = "gutenprint.${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}";
in
{ {
services = { services = {
printing = { printing = {
@ -10,4 +12,28 @@
}; };
avahi.enable = true; avahi.enable = true;
}; };
hardware.printers.ensurePrinters = [
{
name = "kanna";
deviceUri = "socket://kanna.home.sbruder.de";
model = "${gutenprintWithVersion}://kyocera-fs-c5200dn/expert";
ppdOptions = {
PageSize = "A4";
};
}
{
name = "tintenpisser";
deviceUri = "ipp://tintenpisser.home.sbruder.de:631/ipp/print";
model = "everywhere";
ppdOptions = {
PageSize = "A4";
};
}
{
name = "ich_drucke_nicht";
deviceUri = "socket://192.168.178.26";
model = "${gutenprintWithVersion}://bjc-TS3100-series/expert";
}
];
} }