mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-23 15:34:04 +01:00
feat(aquamarine): join the friends' tailnet (#536)
Assisted-by: DeepSeek Harness (claude-opus-5-5)
This commit is contained in:
1 parent
a9d38491f0
commit
1bc8d252a6
4 files changed
+33
-1
No files matched your search
+1
-1
@@ -36,7 +36,7 @@ small, reversible controls and narrow exceptions; benchmark before adopting expe
|
||||
| Boundary | Current design | Limitation |
|
||||
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Administration | Key-based SSH; root key login retained for Colmena/MicroVM deployment; only keys declared in Nix are honoured, and no password or keyboard-interactive login; remote-builder host keys only reach `nix-daemon` | Deployment credentials are root-equivalent file keys, usable by any same-user process through the desktop SSH agent; one stolen key reaches every host |
|
||||
| Host network | Shared nftables firewall trusts the home LAN, tailnet interface and local Podman bridge; IPv6 link-local is accepted | These are broad trust zones, not service-level least privilege; router exposure and tailnet ACLs require separate verification |
|
||||
| Host network | Shared nftables firewall trusts the home LAN, tailnet interface and local Podman bridge; IPv6 link-local is accepted | These are broad trust zones, not service-level least privilege; router exposure and tailnet ACLs require separate verification; aquamarine also joins a tailnet shared with friends, which reaches its wildcard-bound sockets (see its README) |
|
||||
| Monitoring | node/smartctl exporters bind the host LAN IPv4 (9100/9633); firewall rules restrict exporter ports 9100, 9835 and 9633 to the monitoring host over IPv4. RAPL counters are exposed only on x86 server hosts, to `node-exporter` through the `rapl` group. | nvidia_gpu_exporter (9835) still binds wildcard; the IPv6 denial for those three ports is in the shared firewall; current running hosts require separate verification. The node_exporter account can measure package energy for local side channels; interactive users, desktops, and guests keep the kernel-default root-only permission. |
|
||||
| VM hosts | shoryu, shushou and youko run guests behind `br0`; ruby/kana are libvirt guests | A bridge is not network isolation; host compromise affects its guests |
|
||||
| k3s | Three control-plane and three worker MicroVMs; Cilium, API VIP and NFS CSI | Cluster-admin, privileged/host-mounted pods and writable NFS data are powerful trust boundaries |
|
||||
|
||||
@@ -279,6 +279,17 @@ The builder's login user is `root`, which the daemon trusts by default, so this
|
||||
host key, which is passphrase-free and root-readable; `hosts/idols-aquamarine/default.nix`
|
||||
authorizes those keys for root.
|
||||
|
||||
## Friends' tailnet
|
||||
|
||||
Aquamarine joins a tailnet shared with friends so they can use llama-swap/Strata. Log in once with
|
||||
`sudo tailscale login`; the node state stays in the persisted `/var/lib/tailscale`.
|
||||
|
||||
The shared firewall accepts everything on `tailscale0`, so what that tailnet reaches is decided by
|
||||
bind addresses: sockets on the LAN IPv4 (ASR, MagPie, the exporters) are unreachable from it, while
|
||||
wildcard sockets (SSH, LLMNR/mDNS) are reachable. llama-swap's Quadlet unit, which lives outside
|
||||
this repository, must therefore listen on `0.0.0.0:63081`. Friends cannot wake the host from idle
|
||||
suspend; Wake-on-LAN works only on the LAN.
|
||||
|
||||
## Deploy
|
||||
|
||||
```bash
|
||||
|
||||
@@ -38,6 +38,7 @@ in
|
||||
# services
|
||||
./asr
|
||||
./idle-suspend.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
# A failed initrd drops to a root shell behind the root password (docs/SECURITY.md).
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Joins the tailnet shared with friends: ./README.md#friends-tailnet.
|
||||
{
|
||||
# `services.tailscale` already puts the CLI in `environment.systemPackages`.
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
port = 41641;
|
||||
interfaceName = "tailscale0";
|
||||
# No-op here: the shared firewall opens 41641 in `extraInputRules` and
|
||||
# forces `allowedUDPPorts` empty.
|
||||
openFirewall = true;
|
||||
|
||||
extraSetFlags = [
|
||||
# Friends' devices share this tailnet: their routes must not shadow the
|
||||
# home LAN, and its DNS settings must not replace the proxy gateway.
|
||||
"--accept-routes=false"
|
||||
"--accept-dns=false"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user