mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
26 lines
586 B
Nix
26 lines
586 B
Nix
{
|
|
lib,
|
|
gensokyo-zone,
|
|
...
|
|
}: let
|
|
inherit (gensokyo-zone.lib) mapAlmostOptionDefaults mkAlmostOptionDefault;
|
|
inherit (lib.attrsets) mapAttrs;
|
|
in {
|
|
config.exports.services.dnsmasq = {config, ...}: {
|
|
id = mkAlmostOptionDefault "dns";
|
|
nixos = {
|
|
serviceAttr = "dnsmasq";
|
|
};
|
|
defaults.port.listen = mkAlmostOptionDefault "lan";
|
|
ports = mapAttrs (_: mapAlmostOptionDefaults) {
|
|
default = {
|
|
port = 53;
|
|
transport = "udp";
|
|
};
|
|
tcp = {
|
|
port = config.ports.default.port;
|
|
transport = "tcp";
|
|
};
|
|
};
|
|
};
|
|
}
|