setup octodns for automatic dns records
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||
|
||||
{ config, pkgs, ssh, ... }:
|
||||
|
||||
let
|
||||
ipv4Address = "65.21.145.150";
|
||||
ipv6Address = "2a01:4f9:c011:9ac1::1";
|
||||
in
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
@@ -25,13 +28,24 @@
|
||||
networking.useDHCP = false;
|
||||
networking.nftables.enable = true;
|
||||
|
||||
services.octodns.records."" = {
|
||||
A = {
|
||||
ttl = 86400;
|
||||
values = [ ipv4Address ];
|
||||
};
|
||||
AAAA = {
|
||||
ttl = 86400;
|
||||
values = [ ipv6Address ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks.static = {
|
||||
name = "enp1s0";
|
||||
address = [
|
||||
"65.21.145.150/32"
|
||||
"2a01:4f9:c011:9ac1::1/64"
|
||||
"${ipv4Address}/32"
|
||||
"${ipv6Address}/64"
|
||||
];
|
||||
routes = [
|
||||
{ Gateway = "fe80::1"; }
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"vaultwarden"
|
||||
"donetick"
|
||||
"dnote"
|
||||
"octodns"
|
||||
]
|
||||
) // {
|
||||
smtp-password = {
|
||||
|
||||
@@ -12,7 +12,6 @@ let
|
||||
secrets = config.age.secrets;
|
||||
in
|
||||
{
|
||||
services.postgresql.package = pkgs.postgresql_16;
|
||||
virtualisation.podman.enable = true;
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
@@ -33,6 +32,16 @@ in
|
||||
};
|
||||
|
||||
services = {
|
||||
postgresql.package = pkgs.postgresql_16;
|
||||
octodns = {
|
||||
enable = true;
|
||||
records."".MX = {
|
||||
ttl = 86400;
|
||||
values = [{ exchange = "${smtp.host}."; }];
|
||||
};
|
||||
defaults.CNAME.ttl = 60;
|
||||
};
|
||||
|
||||
hastebin = {
|
||||
enable = true;
|
||||
subdomain = "bin";
|
||||
|
||||
Reference in New Issue
Block a user