dotfiles/modules/nixos/hardware/networking.nix

27 lines
800 B
Nix
Raw Normal View History

{ config, lib, ... }: {
2022-12-21 21:18:03 +00:00
config = lib.mkIf config.physical {
2022-12-21 21:18:03 +00:00
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
2023-01-31 14:07:47 +00:00
networking.interfaces.enp5s0.useDHCP = true;
networking.interfaces.wlp4s0.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;
# DNS service discovery
services.avahi.enable = true;
# services.avahi.public.enable = true;
# services.avahi.public.domain = true;
# services.avahi.public.addresses = true;
# services.avahi.domainName = "local";
# Resolve local hostnames using Avahi DNS
services.avahi.nssmdns = true;
2023-03-06 04:46:12 +00:00
2022-12-21 21:18:03 +00:00
};
2022-04-29 02:25:05 +00:00
}