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"; }
|
||||
|
||||
Reference in New Issue
Block a user