2025-01-28 18:24:07 -05:00

34 lines
578 B
Nix

{
config,
lib,
...
}:
let
cfg = config.nmasur.presets.services.avahi;
in
{
options.nmasur.presets.services.avahi.enable = lib.mkEnableOption "Avahi DNS service discovery";
config = lib.mkIf cfg.enable {
# DNS service discovery
services.avahi = {
enable = true;
domainName = "local";
ipv6 = false; # Should work either way
# Resolve local hostnames using Avahi DNS
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
domain = true;
workstation = true;
};
};
};
}