# What the swarm's SSH CA and its agent role fix, spelled once for the two # files that must agree: ../swarm-bao.nix writes the role, and # ../../agent-modules/ssh.nix signs through it and renews on a schedule # derived from the certificate's lifetime. # # `mountPath` and `roleName` are also `swarm_secret_client::policy::SSH_MOUNT` # and `SSH_ROLE`, which the SSH signing policy names; the bao-grants module-eval # suite reads that file and fails when the two disagree. # # Pure attrset, not a NixOS module. { }: rec { mountPath = "ssh-agents"; roleName = "swarm-agent"; # A certificate is valid this long, and the role refuses a longer request. certTtlMinutes = 60; certMaxTtlMinutes = 180; # A third of the lifetime: a run that fails once still leaves the old # certificate valid for the retry, and a few failed runs still do. renewEveryMinutes = certTtlMinutes / 3; }