From 1e96221b75adae3fb01b8f1290e0f04c6ae46db6 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 16 Oct 2024 14:43:21 +0200 Subject: [PATCH] feat(homeprinter): enable Avahi service and configure firewall Enable Avahi service to support mDNS for both IPv4 and IPv6. Add mDNS port 5353 to the allowed UDP ports in the firewall to ensure network discovery. --- modules/nixos/services/homeprinter/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/nixos/services/homeprinter/default.nix b/modules/nixos/services/homeprinter/default.nix index 09fbaa5..c5ab726 100644 --- a/modules/nixos/services/homeprinter/default.nix +++ b/modules/nixos/services/homeprinter/default.nix @@ -16,6 +16,16 @@ in gutenprint ]; + services.avahi = { + enable = true; + nssmdns4 = true; + nssmdns6 = true; + ipv6 = true; + ipv4 = true; + }; + + networking.firewall.allowedUDPPorts = [ 5353 ]; + hardware.printers.ensurePrinters = [ { name = "Brother_DCP-L2530DW_series";