services.avahi.extraServiceFiles

NixOS option

Specify custom service definitions which are placed in the avahi service directory. See the avahi.service(5) manpage for detailed information.

type: attribute set of (string or absolute path)
Default
{ }
Example
{
  ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
  smb = ''
    <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
      <name replace-wildcards="yes">%h</name>
      <service>
        <type>_smb._tcp</type>
        <port>445</port>
      </service>
    </service-group>
  '';
}
declared in: nixos/modules/services/networking/avahi-daemon.nixView source on NixOS/nixpkgs →