zones: import misplaced options from ssh

This commit is contained in:
tv 2023-08-01 14:06:03 +02:00
parent f091cd5e03
commit 85816b60c2
2 changed files with 16 additions and 23 deletions

View File

@ -4,32 +4,9 @@ let
cfg = config.krebs; cfg = config.krebs;
out = { out = {
options.krebs = api;
config = lib.mkIf cfg.enable imp; config = lib.mkIf cfg.enable imp;
}; };
api = {
zone-head-config = mkOption {
type = with types; attrsOf str;
description = ''
The zone configuration head which is being used to create the
zone files. The string for each key is pre-pended to the zone file.
'';
# TODO: configure the default somewhere else,
# maybe use krebs.dns.providers
default = {
# github.io -> 192.30.252.154
"krebsco.de" = ''
$TTL 86400
@ IN SOA dns19.ovh.net. tech.ovh.net. (2015052000 86400 3600 3600000 86400)
IN NS ns19.ovh.net.
IN NS dns19.ovh.net.
'';
};
};
};
imp = lib.mkMerge [ imp = lib.mkMerge [
{ {
services.openssh.hostKeys = services.openssh.hostKeys =

View File

@ -1,6 +1,22 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with lib; { with lib; {
options.krebs.zone-head-config = mkOption {
type = lib.types.attrsOf lib.types.str;
description = ''
The zone configuration head which is being used to create the
zone files. The string for each key is pre-pended to the zone file.
'';
default = {
"krebsco.de" = /* bindzone */ ''
$TTL 86400
@ IN SOA dns19.ovh.net. tech.ovh.net. (2015052000 86400 3600 3600000 86400)
@ IN NS ns19.ovh.net.
@ IN NS dns19.ovh.net.
'';
};
};
config = { config = {
environment.etc = environment.etc =
mapAttrs' mapAttrs'