dotfiles/modules/nixos/hardware/networking.nix

35 lines
731 B
Nix
Raw Normal View History

2024-04-20 13:42:06 +00:00
{
config,
pkgs,
lib,
...
}:
{
2022-12-21 21:18:03 +00:00
config = lib.mkIf config.physical {
2022-12-21 21:18:03 +00:00
networking.useDHCP = !config.networking.networkmanager.enable;
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;
domainName = "local";
2023-07-18 03:52:37 +00:00
ipv6 = false; # Should work either way
# Resolve local hostnames using Avahi DNS
2024-01-02 00:48:52 +00:00
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
domain = true;
workstation = true;
};
};
2023-07-21 01:07:09 +00:00
environment.systemPackages = [
2024-04-20 13:42:06 +00:00
(pkgs.writeShellScriptBin "wake-tempest" "${pkgs.wakeonlan}/bin/wakeonlan --ip=192.168.1.255 74:56:3C:40:37:5D")
2023-07-21 01:07:09 +00:00
];
2022-12-21 21:18:03 +00:00
};
2022-04-29 02:25:05 +00:00
}