42 lines
729 B
Nix
42 lines
729 B
Nix
#
|
|
# Configures a machine to print.
|
|
#
|
|
# vim: et:ts=2:sw=2:
|
|
#
|
|
{ pkgs, ... }:
|
|
{
|
|
services.printing = {
|
|
|
|
# Run as a "stateless" service in which printing is
|
|
# configrued via Nix.
|
|
enable = true;
|
|
stateless = true;
|
|
|
|
drivers = [
|
|
pkgs.canon-cups-ufr2
|
|
];
|
|
};
|
|
|
|
#
|
|
# Printers.
|
|
#
|
|
hardware.printers = {
|
|
|
|
ensurePrinters = [
|
|
{
|
|
name = "Canon_MF4800";
|
|
location = "Laundry Room";
|
|
deviceUri = "socket://192.168.50.239:9100";
|
|
model = "file://CNRCUPSMF4800ZS.ppd";
|
|
ppdOptions = {
|
|
PageSize = "Letter";
|
|
};
|
|
}
|
|
];
|
|
|
|
ensureDefaultPrinter = "Canon_MF4800";
|
|
};
|
|
|
|
# Enables config uis.
|
|
services.system-config-printer.enable = true;
|
|
}
|