From 653b5036761b144bdc4c2c65619e1cc7bdff647b Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Tue, 22 Aug 2023 09:57:40 +0200 Subject: [PATCH] add printer with ipp --- hosts/nb-01.cloonar.com/modules/printer.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/hosts/nb-01.cloonar.com/modules/printer.nix b/hosts/nb-01.cloonar.com/modules/printer.nix index d83f8b8..9621996 100644 --- a/hosts/nb-01.cloonar.com/modules/printer.nix +++ b/hosts/nb-01.cloonar.com/modules/printer.nix @@ -1,6 +1,22 @@ -{ +let + brother = "Brother_HL-L2360D"; + hostName = "brn30055c566237.cloonar.multimedia"; +in { services.printing.enable = true; services.avahi.enable = true; services.avahi.nssmdns = true; services.avahi.openFirewall = true; + + hardware.printers = { + ensureDefaultPrinter = brother; + ensurePrinters = [ + { + name = brother; + deviceUri = "ipp://${hostName}/ipp"; + model = "everywhere"; + description = lib.replaceStrings [ "_" ] [ " " ] brother; + location = "Study"; + } + ]; + }; }