Watch
0
0
Fork
You've already forked hyperhive
0

move nixBuilds into its own agent module, and have the vm test's agent import it

This commit is contained in:
atlas 2026-11-05 15:55:54 +01:00 • committed by mara
commit d5eb7711e6

View file

@ -36,6 +36,28 @@ let
services.hyperhive.agent.user.name = "iris";
services.hyperhive.agent.nixBuilds = "container";
};
# The VM test's agent stand-in: the user and nix-builds modules on a plain
# container, under each mode.
standIn =
mode:
(nixosSystem {
system = pkgs.stdenv.hostPlatform.system;
modules = [
../agent-modules/user.nix
../agent-modules/nix-builds.nix
{
fileSystems."/" = {
device = "/dev/null";
fsType = "tmpfs";
};
boot.loader.grub.enable = false;
system.stateVersion = "25.11";
services.hyperhive.agent.nixBuilds = mode;
}
];
}).config;
standInHost = standIn "host";
standInNone = standIn "none";
# `privateUsers` with the given pins; the agent name is the one the cases
# above use, so only the pins differ.
withUsers =
@ -143,7 +165,13 @@ let
iris.systemd.sockets.nix-daemon.enable
&& iris.systemd.services.nix-daemon.enable
&& !noBuilds.systemd.sockets.nix-daemon.enable
&& !noBuilds.systemd.services.nix-daemon.enable;
&& !noBuilds.systemd.services.nix-daemon.enable
# The VM test's agent stand-in imports these two modules and not the
# whole agent module set, so the disable has to live in the former.
&& standInHost.systemd.sockets.nix-daemon.enable
&& standInHost.systemd.services.nix-daemon.enable
&& !standInNone.systemd.sockets.nix-daemon.enable
&& !standInNone.systemd.services.nix-daemon.enable;
}
];
in