mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-27 09:54:53 +00:00
d013f980a7
and start removing if statements
27 lines
800 B
Nix
27 lines
800 B
Nix
{ config, lib, ... }: {
|
|
|
|
config = lib.mkIf config.physical {
|
|
|
|
# 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;
|
|
networking.interfaces.enp5s0.useDHCP = true;
|
|
networking.interfaces.wlp4s0.useDHCP = true;
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|