Technitium DNS with failover over dns02
This commit is contained in:
parent
076234c4bd
commit
1efda446f3
13 changed files with 235 additions and 0 deletions
46
hosts/dns/dns-02.nix
Normal file
46
hosts/dns/dns-02.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
age.secrets = {
|
||||
dns02-admin-password.file = ../../secrets/dns02-admin-password.age;
|
||||
dns02-dhcp-failover.file = ../../secrets/dns02-dhcp-failover.age;
|
||||
};
|
||||
|
||||
my = {
|
||||
|
||||
networking.technitium-dns-server = {
|
||||
enable = true;
|
||||
dnsOverHttps = false;
|
||||
adminPasswordFile = config.age.secrets.dns02-admin-password.path;
|
||||
};
|
||||
|
||||
utils = {
|
||||
commons.enable = true;
|
||||
commons.gc.enable = true;
|
||||
lxc-standard.enable = true;
|
||||
};
|
||||
|
||||
virtualisation.proxmox.enable = true;
|
||||
};
|
||||
|
||||
# systemd.services.dhcp-failover = {
|
||||
# description = "Set the current server as the primary DHCP server if the other one is down";
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# path = [ pkgs.curl ];
|
||||
# serviceConfig = {
|
||||
# EnvironmentFile = config.age.secrets.dns02-dhcp-failover.path;
|
||||
# ExecStart = "${pkgs.writeShellScript "dhcp-failover.sh" (builtins.readFile ./dhcp-failover.sh)}";
|
||||
# Restart = "on-failure";
|
||||
# DynamicUser = true;
|
||||
# StandardOutput = "journal";
|
||||
# StandardError = "journal";
|
||||
# };
|
||||
# };
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue