2021-11-16 16:56:43 -08:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
hostname = config.instance.hostname;
|
2021-11-17 17:32:27 -08:00
|
|
|
host-ipv4 = "208.81.4.82";
|
2021-11-16 16:56:43 -08:00
|
|
|
site-name = config.fudo.hosts.${hostname}.site;
|
|
|
|
site = config.fudo.sites.${site-name};
|
|
|
|
|
|
|
|
local-packages = with pkgs; [
|
|
|
|
bind
|
|
|
|
];
|
|
|
|
|
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
networking = {
|
|
|
|
defaultGateway = {
|
|
|
|
address = site.gateway-v4;
|
|
|
|
interface = "extif0";
|
|
|
|
};
|
|
|
|
|
|
|
|
interfaces.extif0 = {
|
|
|
|
ipv4.addresses = [{
|
|
|
|
address = host-ipv4;
|
2021-11-17 17:32:27 -08:00
|
|
|
prefixLength = 29;
|
2021-11-16 16:56:43 -08:00
|
|
|
}];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = local-packages;
|
|
|
|
};
|
|
|
|
}
|