nixos-conf/modules/networking/printing.nix

37 lines
702 B
Nix
Raw Normal View History

2025-07-24 11:48:48 +03:00
{
config,
lib,
pkgs,
...
}:
let
2025-07-06 03:22:09 +03:00
cfg = config.custom.networking.printing;
in
{
2025-07-24 11:48:48 +03:00
options.custom.networking.printing.enable = lib.mkEnableOption "printing at home";
config = lib.mkIf cfg.enable {
2025-07-24 11:48:48 +03:00
services.printing = {
enable = true;
drivers = lib.singleton (
pkgs.linkFarm "drivers" [
{
name = "share/cups/model/brother_home.ppd";
path = ./brother_home.ppd;
}
]
);
};
2025-07-24 11:48:48 +03:00
hardware.printers.ensurePrinters = [
{
name = "Borther_HL-L2370DN";
location = "Home";
deviceUri = "ipps://printer.vsinerva.fi:631/ipp/print";
model = "brother_home.ppd";
}
];
};
}