From 0d23896dbbd987e3658af26c1a970c0828e919fe Mon Sep 17 00:00:00 2001 From: atlas Date: Tue, 4 Aug 2026 23:21:12 +0200 Subject: [PATCH] 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. --- nix/host-modules/default.nix | 1 - nix/host-modules/hive-forge/default.nix | 10 ++++++++++ nix/host-modules/swarm-renames.nix | 26 ------------------------- 3 files changed, 10 insertions(+), 27 deletions(-) delete mode 100644 nix/host-modules/swarm-renames.nix diff --git a/nix/host-modules/default.nix b/nix/host-modules/default.nix index 9a0ebcc7..2b87a421 100644 --- a/nix/host-modules/default.nix +++ b/nix/host-modules/default.nix @@ -12,7 +12,6 @@ { imports = [ ./hyperhive.nix - ./swarm-renames.nix ./hive-c0re ./hive-ci.nix ./hive-forge diff --git a/nix/host-modules/hive-forge/default.nix b/nix/host-modules/hive-forge/default.nix index 118f5022..518e22cf 100644 --- a/nix/host-modules/hive-forge/default.nix +++ b/nix/host-modules/hive-forge/default.nix @@ -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 diff --git a/nix/host-modules/swarm-renames.nix b/nix/host-modules/swarm-renames.nix deleted file mode 100644 index dc06afe2..00000000 --- a/nix/host-modules/swarm-renames.nix +++ /dev/null @@ -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" ] - ) - ]; -}