summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-11-23 16:49:41 +0100
committertv <tv@krebsco.de>2022-11-23 19:15:49 +0100
commita278a6503bf1c8de8e233f72faa442baaab29ab0 (patch)
tree895d0ef092b492db22460434b2633577808fe1a2
parent6af959ad44a85b1f89ce347480bf18a46a039571 (diff)
krebs dns: move config to dns module
-rw-r--r--krebs/3modules/default.nix10
-rw-r--r--krebs/3modules/dns.nix13
2 files changed, 11 insertions, 12 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index a8cf6c767..e8f5d1611 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -95,16 +95,6 @@ let
imp = lib.mkMerge [
{
- krebs.dns.providers = {
- "krebsco.de" = "zones";
- shack = "hosts";
- i = "hosts";
- r = "hosts";
- w = "hosts";
- };
-
- krebs.dns.search-domain = mkDefault "r";
-
services.openssh.hostKeys =
let inherit (config.krebs.build.host.ssh) privkey; in
mkIf (privkey != null) [privkey];
diff --git a/krebs/3modules/dns.nix b/krebs/3modules/dns.nix
index 8acc4ccd8..8a74d3067 100644
--- a/krebs/3modules/dns.nix
+++ b/krebs/3modules/dns.nix
@@ -1,12 +1,21 @@
with import <stockholm/lib>;
-{
+{ config, ... }: {
options = {
krebs.dns.providers = mkOption {
type = types.attrsOf types.str;
};
-
krebs.dns.search-domain = mkOption {
type = types.nullOr types.hostname;
};
};
+ config = mkIf config.krebs.enable {
+ krebs.dns.providers = {
+ "krebsco.de" = "zones";
+ shack = "hosts";
+ i = "hosts";
+ r = "hosts";
+ w = "hosts";
+ };
+ krebs.dns.search-domain = mkDefault "r";
+ };
}