mirror of
https://github.com/thegeneralist01/config.git
synced 2026-10-09 21:03:30 +02:00
nixos: migrate server services to thegeneralist
Move hosted services and secrets from the retired central hosts, persist USB storage and ownership, harden RTL8822BU Wi-Fi, repair DNS behavior, and order CoreDNS after Tailscale.
This commit is contained in:
parent
7f5ecd917b
commit
bd887883f7
41 changed files with 183 additions and 511 deletions
53
hosts/thegeneralist/dns.nix
Normal file
53
hosts/thegeneralist/dns.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
subdomains = [ "internal" "archive" "plex" ];
|
||||
|
||||
mainZoneFile = pkgs.writeText "thegeneralist01.zone" ''
|
||||
$ORIGIN thegeneralist01.com.
|
||||
@ IN SOA ns.thegeneralist01.com. thegeneralist01.proton.me. (
|
||||
2025081501 ; serial (yyyymmddXX)
|
||||
3600 ; refresh
|
||||
600 ; retry
|
||||
86400 ; expire
|
||||
3600 ; minimum
|
||||
)
|
||||
IN NS ns.thegeneralist01.com.
|
||||
ns IN A 100.108.125.63
|
||||
${lib.concatStringsSep "\n" (lib.map (sub: "${sub} IN A 100.108.125.63") subdomains)}
|
||||
'';
|
||||
|
||||
forwarderBlock = ''
|
||||
.:53 {
|
||||
bind 100.108.125.63
|
||||
forward . 100.100.100.100 45.90.28.181 45.90.30.181
|
||||
cache
|
||||
log
|
||||
errors
|
||||
}
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.coredns = {
|
||||
enable = true;
|
||||
config = ''
|
||||
thegeneralist01.com:53 {
|
||||
bind 100.108.125.63
|
||||
file ${mainZoneFile}
|
||||
log
|
||||
errors
|
||||
}
|
||||
|
||||
${forwarderBlock}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.coredns = {
|
||||
wants = [ "network-online.target" "tailscaled.service" ];
|
||||
after = [ "network-online.target" "tailscaled.service" ];
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = "2s";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue