mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 06:22:02 +00:00
34 lines
578 B
Nix
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;
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|