nixos-config/modules/cups.nix

41 lines
947 B
Nix
Raw Normal View History

2020-10-18 22:25:05 +02:00
{ lib, pkgs, ... }:
let
gutenprintWithVersion = "gutenprint.${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}";
in
2020-08-22 17:44:39 +02:00
{
2020-08-30 13:20:57 +02:00
services = {
printing = {
enable = true;
drivers = with pkgs; [
gutenprint
];
};
avahi.enable = true;
2020-08-29 23:54:35 +02:00
};
2020-10-18 22:25:05 +02:00
hardware.printers.ensurePrinters = [
{
name = "kanna";
deviceUri = "socket://kanna.home.sbruder.de";
model = "${gutenprintWithVersion}://kyocera-fs-c5200dn/expert";
ppdOptions = {
PageSize = "A4";
};
}
2020-10-24 13:34:07 +02:00
# printer is broken and makes systemd unit fail
#{
# name = "tintenpisser";
# deviceUri = "ipp://tintenpisser.home.sbruder.de:631/ipp/print";
# model = "everywhere";
# ppdOptions = {
# PageSize = "A4";
# };
#}
2020-10-18 22:25:05 +02:00
{
name = "ich_drucke_nicht";
deviceUri = "socket://192.168.178.26";
model = "${gutenprintWithVersion}://bjc-TS3100-series/expert";
}
];
2020-08-22 17:44:39 +02:00
}