2024-07-16 21:31:28 +00:00
|
|
|
/*
|
|
|
|
Define the options for dns records here.
|
|
|
|
They are imported into anything that needs to use them
|
|
|
|
*/
|
|
|
|
{lib, ...}:
|
|
|
|
with lib; {
|
|
|
|
options = {
|
2024-07-16 22:17:38 +00:00
|
|
|
domain = lib.mkOption {
|
|
|
|
description = "Domain this record is for";
|
|
|
|
type = lib.types.str;
|
|
|
|
default = "skynet.ie";
|
|
|
|
};
|
2024-07-16 21:31:28 +00:00
|
|
|
record = lib.mkOption {
|
2024-07-16 22:17:38 +00:00
|
|
|
description = "What you want to name the subdomain.";
|
2024-07-16 21:31:28 +00:00
|
|
|
type = lib.types.str;
|
|
|
|
};
|
|
|
|
r_type = lib.mkOption {
|
2024-07-16 22:17:38 +00:00
|
|
|
description = "Type of record that this is.";
|
2024-07-16 21:31:28 +00:00
|
|
|
type = lib.types.enum ["A" "CNAME" "TXT" "PTR" "SRV" "MX"];
|
|
|
|
};
|
|
|
|
value = lib.mkOption {
|
2024-07-16 22:17:38 +00:00
|
|
|
description = "What the record points to, normally ip or another record.";
|
2024-07-16 21:31:28 +00:00
|
|
|
type = lib.types.str;
|
|
|
|
};
|
|
|
|
server = lib.mkOption {
|
|
|
|
description = "Core record for a server";
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|