From d1cee4e19e4d9be3ba4306283e4402cf8f124551 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sat, 12 Nov 2022 16:20:40 -0500 Subject: [PATCH] Actually fix printing!!! --- modules/linux/hardware.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/linux/hardware.nix b/modules/linux/hardware.nix index 3e79ec4..1ca7153 100644 --- a/modules/linux/hardware.nix +++ b/modules/linux/hardware.nix @@ -31,12 +31,24 @@ in with lib; { enable = true; drivers = with pkgs; [ canon-cups-ufr2 ]; }; - + environment.systemPackages = with pkgs; [ canon-cups-ufr2 ]; # Enable avahi for printer discovery services.avahi = { enable = true; - nssmdns = true; + nssmdns = false; + interfaces = [ "enp6s0" ]; + hostName = "levitation"; + domainName = "local"; + openFirewall = true; }; + system.nssModules = with pkgs.lib; + optional (!config.services.avahi.nssmdns) pkgs.nssmdns; + system.nssDatabases.hosts = with pkgs.lib; + optionals (!config.services.avahi.nssmdns) (mkMerge [ + (mkOrder 900 + [ "mdns4_minimal [NOTFOUND=return]" ]) # must be before resolve + (mkOrder 1501 [ "mdns4" ]) # 1501 to ensure it's after dns + ]); }) ]; }