mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 08:45:02 +01:00
45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
# https://github.com/nix-community/dns.nix
|
|
{ pkgs, ... }:
|
|
let
|
|
data = with pkgs.nix-dns.lib.combinators;
|
|
let
|
|
dns1 = host "154.38.163.74" null;
|
|
dns2 = host "128.140.3.7" "2a01:4f8:c2c:d616::";
|
|
|
|
vps1 = host "161.97.165.1" null;
|
|
in
|
|
# vps1 contains root noratrieb.dev
|
|
vps1 // {
|
|
SOA = {
|
|
nameServer = "ns1.noratrieb.dev";
|
|
adminEmail = "void@noratrieb.dev";
|
|
serial = 2024072601;
|
|
};
|
|
|
|
NS = [
|
|
"ns1.noratrieb.dev"
|
|
"ns2.noratrieb.dev"
|
|
];
|
|
|
|
subdomains = {
|
|
www.CNAME = [ (cname "noratrieb.dev") ];
|
|
pronouns.TXT = [
|
|
"she/her"
|
|
];
|
|
|
|
localhost.A = [ (a "127.0.0.1") ];
|
|
newtest.TXT = [ "uwu it works" ];
|
|
|
|
# TODO: generate dynamically from IPs...
|
|
infra.subdomains = {
|
|
inherit dns1;
|
|
inherit dns2;
|
|
inherit vps1;
|
|
};
|
|
};
|
|
};
|
|
in
|
|
pkgs.writeTextFile {
|
|
name = "noratrieb.dev.zone";
|
|
text = pkgs.nix-dns.lib.toString "noratrieb.dev" data;
|
|
}
|