From 5a09885c497eb4aa0c5f4cc13e50bc4b712e3550 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Sun, 30 Aug 2026 16:43:09 -0500 Subject: [PATCH] feat(hardware): configure comprehensive printing and scanning support - Add `"lp"` and `"scanner"` groups to user accounts on both desktop and laptop hosts. - Configure `services.printing` with Epson and Gutenprint drivers. - Enable `services.avahi` (mDNS/Zeroconf) with firewall rules for Wi-Fi printer discovery. - Enable `hardware.sane` with `epsonscan2` backend support. - Add `system-config-printer` and `simple-scan` to system-wide packages. --- hosts/desktop/configuration.nix | 2 ++ hosts/laptop/configuration.nix | 2 ++ modules/system/base.nix | 27 +++++++++++++++++++++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index b3e49f9..77204cf 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -47,6 +47,8 @@ "wheel" # Enable sudo access for administrative tasks "docker" # Allows running docker commands without sudo "networkmanager" # Allows modifying network configurations + "lp" # Allows managing printers and print jobs + "scanner" # Allows access to scanners ]; }; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 71f10b7..73e46ad 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -46,6 +46,8 @@ "wheel" # Enable sudo access for administrative tasks "docker" # Allows running docker commands without sudo "networkmanager" # Allows modifying network configurations + "lp" # Allows managing printers and print jobs + "scanner" # Allows access to scanners ]; }; diff --git a/modules/system/base.nix b/modules/system/base.nix index 0199ab6..c36c509 100644 --- a/modules/system/base.nix +++ b/modules/system/base.nix @@ -23,12 +23,35 @@ pulse.enable = true; # Enable legacy PulseAudio emulation wrapper }; - # Enable printing service - services.printing.enable = true; + # 🖨️ Printing & Scanning configuration (with Epson drivers & Avahi network discovery) + services.printing = { + enable = true; + drivers = with pkgs; [ + epson-escpr + epson-escpr2 + gutenprint + gutenprintBin + ]; + }; + + # Enable mDNS / Zeroconf discovery for Wi-Fi printers + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + + # SANE scanner support (includes Epson scanner backend) + hardware.sane = { + enable = true; + extraBackends = [ pkgs.epsonscan2 ]; + }; # System-wide packages environment.systemPackages = with pkgs; [ cups-pk-helper + system-config-printer + simple-scan rclone ];