I’ve had this same problem, too, but now would be a good time to fix it.
Might as well help others as I figure it out myself!
Looking at a StackOverflow post on CUPS margins, it seems like default margins can be set imperatively via the
More specifically, the following should set the margins, replacing
N with values in units of points, with 72 points to an inch:
lpoptions -p PRINTER_NAME \
-o page-bottom=N \
-o page-left=N \
-o page-right=N \
Running the above command should update printing config files located either at
I’d run the above command (you can press tab to fill the printer name), and take a look at the config file it generates (checking both locations mentioned above).
I’d then put the contents of said configuration file in my NixOS config, using home manager .
I’m not able to test the above right now but I plan on doing so later this week.
Best of luck, and report back whether it works and/or if you have more questions
 If you don’t use home manager already, I recommend giving it a try; it allows you to use your nixos config to specify the contents of files throughout your system, making it super helpful for configuring things not (yet) implemented as one of NixOS’ options.