Unable to get Canon_iR-ADV_C5535_5540_UFR_II working on NixOS

I am new to nix but familiar with Linux and programming and am having trouble setting up a printer at work.

I have the following set up in my nix os config,

I am not sure if this is overkill or if something is lacking.

# Enable CUPS to print documents. # Rijan: Anything after the first line was added by me.
services.printing.enable = true;
services.printing.drivers  = [ pkgs.gutenprint ];
services.avahi.openFirewall = true;

services.printing.browsing = true;
services.printing.browsedConf = ''
BrowseDNSSDSubTypes _cups,_print
BrowseLocalProtocols all
BrowseRemoteProtocols all
CreateIPPPrinterQueues All

BrowseProtocols all
services.avahi = {
  enable = true;
  nssmdns = true;

I pieced the above together from various nix OS forum posts.

The trouble is, I was able to detect my printer but whenever I try to print something, my computer tries for a minute and then says “Is the printer online?”

What can do in this situation? How can I help you help me?