36 lines
702 B
Nix
36 lines
702 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.custom.networking.printing;
|
|
in
|
|
{
|
|
options.custom.networking.printing.enable = lib.mkEnableOption "printing at home";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.printing = {
|
|
enable = true;
|
|
|
|
drivers = lib.singleton (
|
|
pkgs.linkFarm "drivers" [
|
|
{
|
|
name = "share/cups/model/brother_home.ppd";
|
|
path = ./brother_home.ppd;
|
|
}
|
|
]
|
|
);
|
|
};
|
|
|
|
hardware.printers.ensurePrinters = [
|
|
{
|
|
name = "Borther_HL-L2370DN";
|
|
location = "Home";
|
|
deviceUri = "ipps://printer.vsinerva.fi:631/ipp/print";
|
|
model = "brother_home.ppd";
|
|
}
|
|
];
|
|
};
|
|
}
|