Let a dev machine opt out of Forge access #10
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/secrets!10
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/microvm-test-machine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A dev machine that never pushes code no longer has to carry a Forge token. Today every machine in
devVMsis unconditionally givenforgeTokenFile = secrets/forgejo-https-token-<name>.age, so simply naming a machine there makes its configuration fail to evaluate until someone mints a token for it. That is the wrong default for a throwaway machine, and it turns "add a disposable test VM" into a task that cannot start without a human minting credentials.Setting
forgeAccess = falseon adevVMsentry now yields a null token file, which the archetype already handles — the token module is wrapped inlib.optionalAttrs (httpsTokenFile != null), so nothing else changes. Machines that say nothing keep today's behaviour.This lands the mechanism only. No example machine uses it here, because the machine that needs it is a real one and belongs in the deployment's own data, not in this template.
Risk
R1. One conditional in an identity derivation, with the existing default preserved for every machine that does not opt out. Rollback is a revert.
Validation
nix flake checkpasses. The mechanism was exercised end to end before being separated out: a throwaway dev machine withforgeAccess = falsewas added to a scratch copy of this repo plus matching inventory and profile entries, and the composition root evaluated it to a complete system derivation — which it could not do beforehand, failing on the missing token file. That scratch machine was then removed from this branch, leaving only the conditional.