home-lab/modules/network/extraHosts.nix
Geir Okkenhaug Jerstad 2d3728f28b feat: create shared extraHosts module with Tailscale IPs
- Create modules/network/extraHosts.nix with Tailscale IP mappings
- Replace hardcoded networking.extraHosts in all machine configs
- Add extraHosts module import to all machines
- Enable Tailscale service by default in the module
- Use Tailscale mesh network IPs for reliable connectivity
2025-06-07 15:07:17 +00:00

26 lines
No EOL
771 B
Nix

# Network hostname resolution module
# Provides consistent hostname-to-IP mapping across all home lab machines
# Uses Tailscale IPs for reliable connectivity across the mesh network
{ config, lib, ... }:
{
# Add hostname entries for all home lab machines using Tailscale IPs
networking.extraHosts = ''
# Home Lab Infrastructure (Tailscale mesh network)
100.109.28.53 congenital-optimist
100.81.15.84 sleeper-service
100.119.86.92 grey-area
100.96.189.104 reverse-proxy vps1
# Additional network devices
100.103.143.108 pihole
100.126.202.40 wordpresserver
'';
# Enable Tailscale by default for all machines using this module
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
};
}