From 1a25bc085e58fb43ea7a704d4c64ab3e4f851ca2 Mon Sep 17 00:00:00 2001 From: ene Date: Sat, 8 Apr 2023 08:23:52 +0200 Subject: Feat(system/services/printing): Add a printer --- system/services/printing/default.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/system/services/printing/default.nix b/system/services/printing/default.nix index 2e3ef2d2..50f94bcb 100644 --- a/system/services/printing/default.nix +++ b/system/services/printing/default.nix @@ -1,9 +1,5 @@ # vim: ts=2 -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { services.avahi = { enable = true; nssmdns = true; @@ -11,14 +7,26 @@ }; services.printing = { enable = true; - webInterface = false; # don't enable the webinterface + webInterface = false; drivers = with pkgs; [ gutenprint ]; }; - hardware.sane = { - # TODO this properly won't work like this - enable = true; - extraBackends = [pkgs.sane-airscan]; + hardware = { + sane = { + # TODO this won't work like this + enable = true; + extraBackends = [pkgs.sane-airscan]; + }; + printers = { + ensurePrinters = [ + { + name = "Brother"; + model = "everywhere"; + deviceUri = "dnssd://Brother%20DCP-9022CDW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-30055c773bcf"; + } + ]; + ensureDefaultPrinter = "Brother"; + }; }; } -- cgit 1.4.1