# `checks.module-eval-agent-icon` — see ./lib.nix for the shared # rationale (why this suite exists, naming convention, "evaluates # not executes"). { pkgs, lib, self, nixosSystem, }: let inherit (import ./lib.nix { inherit pkgs lib self nixosSystem ; }) agent agentWith runGroup ; # An agent with an icon and no forge. Both halves of the avatar sync — the # `.path` watcher and the oneshot it triggers — hang off the icon, but only # the service can do anything with a forge URL, so the icon alone is the one # input that can render half the feature. `pkgs.emptyFile` rather than a real # SVG: the icon is only ever a gate here, and nothing this case reads # rasterizes it. agentIconNoForge = agentWith { services.hyperhive.agent.icon = pkgs.emptyFile; }; cases = [ { # The absence class, and a gate asymmetry nothing else can see. A `.path` # unit is `wantedBy = multi-user.target` and names a `Unit=` by # convention rather than by reference, so one gated more loosely than the # service it triggers evaluates clean, deploys clean, and then fails to # activate the first time the watched file is written. `forge.url`'s own # option doc already promises the avatar-sync units are "not generated at # all" without a forge — this is the case that makes that sentence true # of the watcher and not only of the oneshot. name = "an agent with an icon and no forge renders neither avatar-sync unit"; ok = !(agentIconNoForge.systemd.paths ? forge-avatar-sync) && !(agentIconNoForge.systemd.services ? forge-avatar-sync); } ]; in runGroup "agent-icon" cases