From aeb743ac90f1c6db8542344a5a64461ef69eb668 Mon Sep 17 00:00:00 2001 From: krizej <60076189+krizej@users.noreply.github.com> Date: Thu, 4 Jul 2024 21:16:50 +0200 Subject: [PATCH] bogos binted --- services/default.nix | 1 + services/printing.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 services/printing.nix diff --git a/services/default.nix b/services/default.nix index 1bc1a7f..3efc6a1 100644 --- a/services/default.nix +++ b/services/default.nix @@ -3,6 +3,7 @@ imports = [ ./dunst.nix ./flameshot.nix + ./printing.nix ./sddm.nix ./xserver.nix ]; diff --git a/services/printing.nix b/services/printing.nix new file mode 100644 index 0000000..dd46f25 --- /dev/null +++ b/services/printing.nix @@ -0,0 +1,27 @@ +{ ... }: +{ + services = { + printing = { + enable = true; + allowFrom = [ "localhost" "192.168.1.*" ]; + }; + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + }; + hardware.printers = { + ensurePrinters = [ + { + name = "brother-dcp-1622we"; + deviceUri = "dnssd://Brother%20DCP-1610W%20series._pdl-datastream._tcp.local/?uuid=e3248000-80ce-11db-8000-c894023b7db8"; + model = "drv:///sample.drv/generpcl.ppd"; + ppdOptions = { + PageSize = "A4"; + }; + } + ]; + ensureDefaultPrinter = "brother-dcp-1622we"; + }; +}