57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{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;
|
|
};
|
|
};
|
|
});
|
|
};
|
|
|
|
config = {
|
|
skynet.records = [
|
|
{
|
|
record = "optimus-reborn";
|
|
r_type = "A";
|
|
value = "193.1.99.90";
|
|
server = true;
|
|
}
|
|
{
|
|
record = "panel.games";
|
|
r_type = "CNAME";
|
|
value = "optimus-reborn";
|
|
}
|
|
#{
|
|
# record = "bumblebee";
|
|
# r_type = "A";
|
|
# value = "193.1.99.91";
|
|
# server = true;
|
|
#}
|
|
#{
|
|
# record = "testing";
|
|
# r_type = "CNAME";
|
|
# value = "bumblebee";
|
|
#}
|
|
];
|
|
};
|
|
}
|