feat: setting it up better

This commit is contained in:
silver 2023-01-17 22:56:05 +00:00
parent 2d0079daa4
commit 2b497b497c

View file

@ -1,5 +1,39 @@
{ lib, pkgs, config, ... }: { { lib, pkgs, config, ... }:
let
cfg = config.skynet_dns;
in {
options = {
skynet_dns = {
enable = lib.mkEnableOption {
default = false;
example = true;
description = "Skynet DNS";
type = lib.types.bool;
};
records = {
external = lib.mkOption {
default = [ ];
type = lib.types.listOf lib.types.str;
description = ''
External records like: agentjones A 193.1.99.72
'';
};
cname = lib.mkOption {
default = [ ];
type = lib.types.listOf lib.types.str;
description = ''
External records like: ns1 CNAME ns1
'';
};
};
};
};
config = lib.mkIf cfg.enable {
services.bind = { services.bind = {
enable = true; enable = true;
@ -18,6 +52,8 @@
}; };
}; };
};
} }