feat: unify the record options

This commit is contained in:
silver 2024-07-16 22:31:28 +01:00
parent 9fb45cba7e
commit b1bd6ca40a
Signed by: silver
GPG key ID: 54E2C71918E93B74
3 changed files with 29 additions and 42 deletions

View file

@ -0,0 +1,23 @@
/*
Define the options for dns records here.
They are imported into anything that needs to use them
*/
{lib, ...}:
with lib; {
options = {
record = lib.mkOption {
type = lib.types.str;
};
r_type = lib.mkOption {
type = lib.types.enum ["A" "CNAME" "TXT" "PTR" "SRV" "MX"];
};
value = lib.mkOption {
type = lib.types.str;
};
server = lib.mkOption {
description = "Core record for a server";
type = lib.types.bool;
default = false;
};
};
}