- per-host darman_password (distinct hash) in secrets/{jupiter,vps,mercury}.yaml
-> hashedPasswordFile; different console password per host (ssh still key-only)
- mercury: dedicated age key (on boot partition post-flash), sops-nix wired
- AdGuard: module has no secret hook + writable config -> mutableSettings=true,
admin password set via web setup on first boot (never in repo/store)
36 lines
1.6 KiB
Nix
36 lines
1.6 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
# mercury — Raspberry Pi 3B+ (aarch64). Network DNS + DHCP (+ adblock).
|
|
# Boots from an SD image (see flake: nixosConfigurations.mercury), so there is
|
|
# no disko / hardware-configuration here — the sd-image module provides them.
|
|
{
|
|
imports = [
|
|
../../common.nix # shared base: user / ssh / nix / firewall
|
|
./secrets.nix # sops-nix: darman password (age key on boot part.)
|
|
../../services/unbound.nix # local recursive resolver (127.0.0.1:5335)
|
|
../../services/adguardhome.nix # DNS adblock + DHCP, forwards to unbound
|
|
];
|
|
|
|
networking.hostName = "mercury";
|
|
|
|
# ---- Static networking ----
|
|
# A DNS/DHCP server must have a fixed address. Fill in the Pi's real values
|
|
# (from `ip -brief a` / `ip route` on the running Pi). eth0 = the Pi's NIC.
|
|
networking.useDHCP = false;
|
|
networking.usePredictableInterfaceNames = false; # keep it named eth0
|
|
networking.interfaces.eth0.ipv4.addresses = [
|
|
{ address = "10.0.0.10"; prefixLength = 24; } # the Pi's current IP
|
|
];
|
|
# VERIFY with `ip route` on the Pi — assuming the router is .1.
|
|
networking.defaultGateway = { address = "10.0.0.1"; interface = "eth0"; };
|
|
# Resolvers for the Pi's OWN lookups (not the LAN service). Kept public so the
|
|
# host resolves during boot without depending on its own AdGuard/unbound.
|
|
networking.nameservers = [ "1.1.1.1" "9.9.9.9" ];
|
|
|
|
# DNS adblock + DHCP (AdGuard) and the recursive resolver (unbound) come from
|
|
# the imported service modules. AdGuard forwards to unbound at 127.0.0.1:5335.
|
|
|
|
# Do not modify after first flash.
|
|
system.stateVersion = "26.05";
|
|
}
|