- Refactored config references from `config.architect.networks` to `config.pepe.core.network.interfaces` across multiple files - Updated `fail2ban.nix`, `firewall.nix`, `tailscale.nix`, and `utilities.nix` to align with new configuration structure - Centralized network interface configuration under `pepe.core` for better maintainability - Maintained existing functionality while modernizing configuration hierarchy
17 lines
452 B
Nix
17 lines
452 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
ifaces = config.pepe.core.network.interfaces;
|
|
in
|
|
{
|
|
# device.address device.hostname
|
|
generateDeviceStrings = devices: lib.concatStringsSep "\n"
|
|
(lib.mapAttrsToList (name: device: "${device.address} ${device.hostname}") devices);
|
|
|
|
getDeviceAddress = interface: device:
|
|
ifaces.${interface}.devices.${device}.address;
|
|
|
|
architectInterfaceAddress = interface:
|
|
ifaces.${interface}.devices.architect.address;
|
|
}
|