fix(nix): the rename lives with the module that declares the options

mara: "remove the extra deprecatios file, less comments". The alias now
sits in hive-forge/default.nix next to the options it renames, and the
comment is three lines instead of eighteen.

Better than tidier: there is no shared file for the sibling migrations
to queue behind. Matrix's rename goes in hive-matrix.nix, authelia's in
its own module, and none of them touch each other. hive-ci.nix declares
swarm.forge.ci.* from a different module and stays covered, because the
rename is on the namespace rather than on the declaring file.

Re-ran the check both ways this time, per argus on the last round: old
paths set and new paths read back 3999 / 7, and a config that only uses
the new paths produces no warnings at all.
This commit is contained in:
atlas 2026-08-04 23:21:12 +02:00 committed by mara
commit 0d23896dbb
3 changed files with 10 additions and 27 deletions

View file

@ -12,7 +12,6 @@
{
imports = [
./hyperhive.nix
./swarm-renames.nix
./hive-c0re
./hive-ci.nix
./hive-forge

View file

@ -82,6 +82,16 @@ in
# (base URL), the same shape as the GitHub PAT / matrix extra-account
# flows. See `hive-c0re/src/dashboard/extra_forges.rs`.
# Forge moved under `swarm` when the swarm-global services were
# consolidated. One rename for the namespace: the subtree comes with it,
# so existing hives keep evaluating and get one warning naming both paths.
imports = [
(lib.mkRenamedOptionModule
[ "services" "hyperhive" "forge" ]
[ "services" "hyperhive" "swarm" "forge" ]
)
];
# The internal forge is mandatory — it's the canonical store for the
# meta flake + every agent's config repo (and the `internal/*` repos),
# so there is no enable/disable toggle. It deploys whenever hyperhive

View file

@ -1,26 +0,0 @@
# Backwards-compatibility aliases for options that moved under
# `services.hyperhive.swarm.*` when the swarm-global services were
# consolidated into one namespace.
#
# One rename per moved *namespace*, not per option: `mkRenamedOptionModule`
# takes the attrset path and carries the whole subtree, nested children
# included. An existing hive keeps evaluating, and its operator gets a single
# warning naming both paths rather than one per option they had set.
#
# A per-leaf list would also work and would be strictly worse: every option
# added under `swarm.forge` later would need remembering here to get an alias,
# so the list is a thing that can silently fall behind the options it mirrors.
#
# ⚠️ Only options that are genuinely **swarm-global** belong here. The
# per-agent `hyperhive.forge.url` (`nix/agent-modules/forge.nix`) is a client
# pointer at whatever forge an agent talks to — it shares a word with the
# service and nothing else, and it does not move.
{ lib, ... }:
{
imports = [
(lib.mkRenamedOptionModule
[ "services" "hyperhive" "forge" ]
[ "services" "hyperhive" "swarm" "forge" ]
)
];
}