Files
nix-config/outputs/x86_64-linux/tests/k3s-api-endpoint/expr.nix
T
ryan4yin | 二花 3fdeedaa78 docs(security): document homelab architecture and agent-first audits
Add SECURITY.md covering the threat model, trust boundaries,
proportionate kernel/process hardening, the update/reboot routine and
remaining prioritized work. Record the dated read-only audit findings
(listeners, privileged workloads, effective RBAC, secret metadata and
sandbox/SSH boundaries) separately from planned controls and runtime
verification.

Define agent-first diagnosis: scoped root read-only access on homelab
hosts, and normal-user diagnostics on core desktops with no new sudo
grants. Add canonical domain-based k3s API endpoint regression tests,
record the unverified Darwin secret-ownership concern as WA-015, and
correct comments claiming mode 0000 blocks privileged root.
2026-10-03 16:26:32 +08:00

18 lines
526 B
Nix

{ lib, outputs }:
let
nodes = lib.filterAttrs (name: _: lib.hasPrefix "k3s-test-1-" name) outputs.nixosConfigurations;
in
lib.mapAttrs (
_: host:
let
inherit (host.config.services) k3s;
endpoint = "https://test-cluster-1.writefor.fun:6443";
in
{
joinsViaDomain = if k3s.clusterInit then k3s.serverAddr == "" else k3s.serverAddr == endpoint;
servingDomainSan =
k3s.role != "server"
|| builtins.elem "--tls-san=test-cluster-1.writefor.fun" (lib.splitString " " k3s.extraFlags);
}
) nodes