2023-04-15 16:58:37 +00:00
|
|
|
{ config, lib, ... }: {
|
2022-12-21 21:18:03 +00:00
|
|
|
|
2023-04-15 16:58:37 +00:00
|
|
|
config = lib.mkIf config.physical {
|
2022-12-21 21:18:03 +00:00
|
|
|
|
2023-07-18 02:00:38 +00:00
|
|
|
networking.useDHCP = true;
|
2022-12-21 21:18:03 +00:00
|
|
|
|
2023-03-06 04:46:12 +00:00
|
|
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
2023-04-15 14:10:10 +00:00
|
|
|
|
|
|
|
# DNS service discovery
|
2023-04-19 20:50:19 +00:00
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
domainName = "local";
|
2023-07-18 03:52:37 +00:00
|
|
|
ipv6 = false; # Should work either way
|
|
|
|
# Resolve local hostnames using Avahi DNS
|
|
|
|
nssmdns = true;
|
2023-04-19 20:50:19 +00:00
|
|
|
publish = {
|
|
|
|
enable = true;
|
|
|
|
addresses = true;
|
|
|
|
domain = true;
|
|
|
|
workstation = true;
|
|
|
|
};
|
|
|
|
};
|
2022-12-21 21:18:03 +00:00
|
|
|
};
|
2022-04-29 02:25:05 +00:00
|
|
|
|
|
|
|
}
|