feat: unify the record options
This commit is contained in:
parent
9fb45cba7e
commit
b1bd6ca40a
3 changed files with 29 additions and 42 deletions
|
@ -1,31 +1,12 @@
|
|||
{lib, ...}: {
|
||||
imports = [
|
||||
# Paths to other modules.
|
||||
# Compose this module out of smaller ones.
|
||||
];
|
||||
|
||||
# this needs to mirror ../applications/dns.nix
|
||||
options.skynet.records = lib.mkOption {
|
||||
description = "Records, sorted based on therir type";
|
||||
type = with lib.types;
|
||||
listOf (submodule {
|
||||
options = {
|
||||
record = lib.mkOption {
|
||||
type = str;
|
||||
};
|
||||
r_type = lib.mkOption {
|
||||
type = enum ["A" "CNAME" "TXT" "PTR" "SRV" "MX"];
|
||||
};
|
||||
value = lib.mkOption {
|
||||
type = str;
|
||||
};
|
||||
server = lib.mkOption {
|
||||
description = "Core record for a server";
|
||||
type = bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
});
|
||||
type = lib.types.listOf (lib.types.submodule (import ../applications/dns/options-records.nix {
|
||||
inherit lib;
|
||||
}));
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue