{ lib, config, options, ... }: let cfg = config.plusultra.services.avahi; inherit (lib) types mkEnableOption mkIf; in { options.plusultra.services.avahi = with types; { enable = mkEnableOption "Avahi"; }; config = mkIf cfg.enable { services.avahi = { enable = true; nssmdns = true; publish = { enable = true; addresses = true; domain = true; hinfo = true; userServices = true; workstation = true; }; extraServiceFiles = { smb = '' %h _smb._tcp 445 ''; }; }; }; }