feat: made the custom dns a tad more general

This commit is contained in:
silver 2024-03-11 23:27:09 +00:00
parent ed43da872c
commit fce75fde73
2 changed files with 39 additions and 32 deletions

View file

@ -241,7 +241,7 @@
}; };
records = records =
config.skynet.records config.skynet.records."skynet.ie"
++ builtins.concatLists ( ++ builtins.concatLists (
lib.attrsets.mapAttrsToList ( lib.attrsets.mapAttrsToList (
key: value: let key: value: let

View file

@ -8,41 +8,48 @@
options.skynet = { options.skynet = {
records = lib.mkOption { records = lib.mkOption {
description = "Records, sorted based on therir type"; description = "Records, sorted based on therir type";
type = lib.types.listOf (lib.types.submodule (import ../_types/dns_object.nix { type = lib.types.attrsOf (lib.types.listOf (lib.types.submodule (import ../_types/dns_object.nix {
inherit lib; inherit lib;
})); })));
}; };
}; };
config = { config = {
skynet.records = [ skynet.records = {
{ "skynet.ie" = [
record = "optimus-reborn"; {
r_type = "A"; record = "optimus-reborn2";
value = "193.1.99.90"; r_type = "A";
server = true; value = "193.1.99.90";
} server = true;
{ }
record = "panel.games"; {
r_type = "CNAME"; record = "panel.games";
value = "optimus-reborn"; r_type = "CNAME";
} value = "optimus-reborn";
{ }
record = "bumblebee"; {
r_type = "A"; record = "bumblebee";
value = "193.1.99.91"; r_type = "A";
server = true; value = "193.1.99.91";
} server = true;
{ }
record = "minecraft.compsoc.games"; {
r_type = "CNAME"; record = "minecraft.compsoc.games";
value = "bumblebee"; r_type = "CNAME";
} value = "bumblebee";
{ }
record = "_minecraft._tcp.minecraft.compsoc.games.skynet.ie."; {
r_type = "SRV"; record = "_minecraft._tcp.minecraft.compsoc.games.skynet.ie.";
value = "0 10 25518 minecraft.compsoc.games.skynet.ie."; r_type = "SRV";
} value = "0 10 25518 minecraft.compsoc.games.skynet.ie.";
]; }
];
# some space to avoid conflicts
};
}; };
} }