mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-13 00:52:56 +00:00
27 lines
487 B
Nix
27 lines
487 B
Nix
{ config, lib, ... }: {
|
|
|
|
config = lib.mkIf config.physical {
|
|
|
|
networking.useDHCP = true;
|
|
|
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
|
|
|
# DNS service discovery
|
|
services.avahi = {
|
|
enable = true;
|
|
domainName = "local";
|
|
publish = {
|
|
enable = true;
|
|
addresses = true;
|
|
domain = true;
|
|
workstation = true;
|
|
};
|
|
};
|
|
|
|
# Resolve local hostnames using Avahi DNS
|
|
services.avahi.nssmdns = true;
|
|
|
|
};
|
|
|
|
}
|