Format repo

This commit is contained in:
Pim Kunis 2024-10-28 16:05:06 +01:00
parent 3169149045
commit 8160b9da0b
37 changed files with 643 additions and 392 deletions

View file

@ -1,8 +1,12 @@
{ config, lib, globals, dns, ... }:
let
kunisZone = dns.lib.toString "kun.is" (import ./kun.is.zone.nix globals dns);
in
{
config,
lib,
globals,
dns,
...
}: let
kunisZone = dns.lib.toString "kun.is" (import ./kun.is.zone.nix globals dns);
in {
options.bind9.enable = lib.mkEnableOption "bind9";
config = lib.mkIf config.bind9.enable {
@ -54,7 +58,7 @@ in
containers = {
bind9-udp = {
image = globals.images.bind9;
envFrom = [{ configMapRef.name = "bind9-env"; }];
envFrom = [{configMapRef.name = "bind9-env";}];
ports.dns-udp = {
containerPort = 53;
@ -77,7 +81,7 @@ in
bind9-tcp = {
image = globals.images.bind9;
envFrom = [{ configMapRef.name = "bind9-env"; }];
envFrom = [{configMapRef.name = "bind9-env";}];
ports.dns-tcp = {
containerPort = 53;
@ -99,10 +103,12 @@ in
};
};
volumes = [{
name = "config";
configMap.name = "bind9-config";
}];
volumes = [
{
name = "config";
configMap.name = "bind9-config";
}
];
};
};
};
@ -117,7 +123,7 @@ in
spec = {
type = "LoadBalancer";
selector.app = "bind9";
ipFamilies = [ "IPv4" "IPv6" ];
ipFamilies = ["IPv4" "IPv6"];
ipFamilyPolicy = "RequireDualStack";
ports.dns = {
@ -137,7 +143,7 @@ in
spec = {
type = "LoadBalancer";
selector.app = "bind9";
ipFamilies = [ "IPv4" "IPv6" ];
ipFamilies = ["IPv4" "IPv6"];
ipFamilyPolicy = "RequireDualStack";
ports.dns = {

View file

@ -1,4 +1,5 @@
globals: dns: with dns.lib.combinators; {
globals: dns:
with dns.lib.combinators; {
CAA = letsEncrypt "caa@kun.is";
SOA = {
@ -17,36 +18,36 @@ globals: dns: with dns.lib.combinators; {
];
TXT = [
(with spf; soft [ "include:spf.glasnet.nl" ])
(with spf; soft ["include:spf.glasnet.nl"])
];
subdomains = rec {
"*".A = [ globals.routerPublicIPv4 ];
"*".A = [globals.routerPublicIPv4];
ns = {
A = [ globals.routerPublicIPv4 ];
AAAA = [ ];
A = [globals.routerPublicIPv4];
AAAA = [];
};
ns1 = ns;
ns2 = ns;
wg = {
A = [ globals.routerPublicIPv4 ];
AAAA = [ ];
A = [globals.routerPublicIPv4];
AAAA = [];
};
#for SMTP2GO to be able send emails from kun.is domain
em670271 = {
CNAME = [ "return.smtp2go.net." ];
CNAME = ["return.smtp2go.net."];
};
"s670271._domainkey" = {
CNAME = [ "dkim.smtp2go.net." ];
CNAME = ["dkim.smtp2go.net."];
};
link = {
CNAME = [ "track.smtp2go.net." ];
CNAME = ["track.smtp2go.net."];
};
};
}