Declare the host user's credential files from the hypervisor identity, as mkDevVm does #74
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/archetypes#74
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Place the host user's forge token and site hosting rclone config from
nexusIdentityfields, null meaning absent, the waymkDevVmalready places dev-machine tokens, so a fork getsallod site deploywith a supported credential path and no deployment-private module. Part of allod/strategy#51.Primary goals:
mkHypervisor(flake.nix:413-470) imports amodules/host-user-credentials.nixbeside./modules/netrc.nix(:436) that declaresage.secrets.user-forgejo-tokenat/home/<user>/.config/git/forgejo-tokenandage.secrets.site-hosting-rcloneat/home/<user>/.config/rclone/rclone.conf, each owner<user>, groupusers, mode0600, symlink, and only when its identity field is non-null.age.secretscontains neither entry and no agenix activation runs for them, which is the template's state and whatdev-forge-opt-outasserts for dev machines (flake.nix:1191-1204,:1273-1277).or null—identity.siteHostingConfigFile or null, so this evaluates against a secrets pin that predates allod/secrets#17 and lands in either order.dev-forge-opt-out: the null branch asserts an empty projection; a fixture path asserts the exact file, path, owner, group and mode; the string-spelling guard follows whatever contract the dev-VM path-form check settles on (:1281-1286, allod/archetypes#70).Current state and specifics
The hypervisor's
specialArgsalready carryidentity(flake.nix:423-428), so a module taking{ identity, ... }needs no new plumbing.modules/agent-forgejo-token.nixis the dev-machine precedent for a single token file placed in the user's home;modules/github-credentials.nix:50for a list of them.Facts the module's header comment should state, read from agenix's
installSecretat the pinned revision: it runsmkdir -pon the custom path's parent as root, so on a fresh host~/.config/rcloneand~/.config/gitcome into being root-owned, which nothing needs to write into; it installs the path withln -sfT, so a hand-written regular file there is replaced in place by the symlink; cleanup removes only the previous generation directory, so removing a declaration later leaves the symlink dangling for the operator to delete. rclone's default config path is exactly the second path, which is whyallod site deploy,checkandconfig showneed no--config, andallod site config updateandreplacerefuse a symlink by design, so a rotation is a secrets change plus a rebuild.Validation: the check above in both branches;
nix evalof the template hypervisor'sconfig.age.secretsshows neither entry; afleet-diff --expect nexusagainst a deployment that supplies both fields changes the host and nothing else, save machines that rebuild on any secrets commit (allod/archetypes#21).Scope
In: the module, its import in
mkHypervisor, the check, and the README line under the hypervisor section.Out: the identity fields themselves (allod/secrets#17, lands first), the deploy command's documentation (allod/nexus#44), and deleting a deployment's own module after its pin advance, which is that deployment's step.