nix/hosts/dns/dns-02.nix
2025-03-16 17:54:42 +01:00

46 lines
1.1 KiB
Nix

{
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 = true;
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";
}