module: default hyperhiveFlake to self — operator no longer sets it

This commit is contained in:
müde 2026-05-15 16:54:05 +02:00
parent 4f91dfef99
commit e2aa40409e
3 changed files with 10 additions and 7 deletions

View file

@ -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";
})

View file

@ -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}";
};
};

View file

@ -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 {