{ config, lib, ... }: let cfg = config.custom.printing; in { options.custom.printing.enable = lib.mkOption { type = lib.types.bool; default = false; }; config = lib.mkIf cfg.enable { services = { printing.enable = true; avahi = { enable = true; nssmdns4 = true; openFirewall = true; }; }; }; }