mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
14 lines
576 B
Nix
14 lines
576 B
Nix
{ lib, config, globals, dns, confLib, ... }:
|
|
let
|
|
inherit (confLib.gen { name = "dns-hostrecord"; proxy = config.node.name; }) serviceName proxyAddress4 proxyAddress6;
|
|
in
|
|
{
|
|
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} on server";
|
|
config = lib.mkIf (config.swarselmodules.server.${serviceName} && config.swarselsystems.isCloud) {
|
|
|
|
nodes.stoicclub.swarselsystems.server.dns.${globals.domains.main}.subdomainRecords = {
|
|
"server.${config.node.name}" = dns.lib.combinators.host proxyAddress4 proxyAddress6;
|
|
};
|
|
|
|
};
|
|
}
|