2025-05-13 14:26:22 +02:00
|
|
|
{ lib, config, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.modules.printing;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.modules.printing = {
|
|
|
|
enable = mkEnableOption "printing";
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# Enable CUPS
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
# Enable Avahi to auto-detect network printers
|
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2025-05-28 12:21:45 +02:00
|
|
|
|
|
|
|
# For SMB network printers
|
|
|
|
services.samba.enable = true;
|
2025-05-13 14:26:22 +02:00
|
|
|
};
|
|
|
|
}
|