From e2aa40409ed0db3607b764d7279315b3b5a2cfdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Fri, 15 May 2026 16:54:05 +0200 Subject: [PATCH] =?UTF-8?q?module:=20default=20hyperhiveFlake=20to=20self?= =?UTF-8?q?=20=E2=80=94=20operator=20no=20longer=20sets=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +---- flake.nix | 1 + nix/modules/hive-c0re.nix | 11 ++++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9433dca..e6255ec 100644 --- a/README.md +++ b/README.md @@ -63,10 +63,7 @@ Minimal `flake.nix` for a host that runs hive-c0re: modules = [ hyperhive.nixosModules.hive-c0re ({ ... }: { - services.hive-c0re = { - enable = true; - hyperhiveFlake = "${hyperhive}"; - }; + services.hive-c0re.enable = true; # ... rest of your host config (hardware, networking, users, …) system.stateVersion = "25.11"; }) diff --git a/flake.nix b/flake.nix index 1224fda..9551efb 100644 --- a/flake.nix +++ b/flake.nix @@ -89,6 +89,7 @@ # builds (already applied internally in `nixosConfigurations`). hive-c0re = import ./nix/modules/hive-c0re.nix { hyperhivePackage = system: self.packages.${system}.default; + hyperhiveFlake = "${self}"; }; }; diff --git a/nix/modules/hive-c0re.nix b/nix/modules/hive-c0re.nix index 1775664..8612223 100644 --- a/nix/modules/hive-c0re.nix +++ b/nix/modules/hive-c0re.nix @@ -1,4 +1,7 @@ -{ hyperhivePackage }: +{ + hyperhivePackage, + hyperhiveFlake, +}: { pkgs, lib, @@ -19,12 +22,14 @@ in }; hyperhiveFlake = lib.mkOption { type = lib.types.str; - default = "/etc/hyperhive"; + default = hyperhiveFlake; + defaultText = lib.literalMD "the flake's own store path"; description = '' URL of the hyperhive flake (no fragment). Inlined into each per-agent `flake.nix` at `inputs.hyperhive.url`. The per-agent flake then pulls `hyperhive.nixosConfigurations.agent-base` to - build the container. + build the container. Defaults to this flake's own store path — + only override if you want agents tracking a different ref. ''; }; dashboardPort = lib.mkOption {