Hand the archetype's exported modules to profile modules, so a profile can compose one #138
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#138
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?
A profile definition cannot currently compose a module this framework exports, which blocks any profile that needs one — the
forgeprofile is the first. Hand the archetype's exported modules to profile modules throughspecialArgs, the same waymkHypervisoralready hands themagenix.Primary goals:
servicebuilder passes the framework'snixosModulesattrset intospecialArgs, so a profile module written as{ allodModules, ... }: { imports = [ allodModules.forgejo ]; ... }composes it with no new flake input.nix/exported-modules.nix, consumed by bothflake.nix(for thenixosModulesoutput, unchanged for every existing consumer) and the builder, so the two cannot drift.specialArgsand a shared file rather than a new builder parameter, because a new parameter is also a key the profiles layer can set and would have to be pinned back innix/builder-arguments.nix.builders.servicewith a fixture definition that imports a module throughallodModulesand asserts the composed result, so the seam is exercised rather than assumed.Current state and specifics
allod/profilesdeclares exactly one input,nixpkgs, and itsflake.nixheader states it never grows one onsecretsorinventory; anarchetypesinput would be an outright cycle, sincearchetypesconsumesprofiles. SoprofileDefinitions.service.forgehas no way to namenixosModules.forgejo.The precedent is
nix/builders/hypervisor.nix, whosespecialArgsalready carriesagenixfor exactly this reason, and whosenexusprofile comment refers tonexus.nixosModules.remoteAdmin.nixosModulesis currently defined inline inflake.nix(publicHost,rentedKvmGuest,staticSite,forgejo).Scope
In:
nix/exported-modules.nix, thespecialArgsaddition on theservicebuilder, the check, and the README's Exports section. Out: extending the seam to thedev,privacyandhypervisorbuilders, which is a one-line addition per builder once a profile there needs it and should not be done speculatively; and theforgeprofile itself (allod/profiles).Part of allod/strategy#65
Landed on master in
6fac2eb(Hand the service builder exported modules and guest address to profile modules); the forge profile composes nixosModules.forgejo through allodModules on allod/profiles master. Closing as part of allod/strategy#65 housekeeping.