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

@ -1,8 +1,8 @@
# `vmTests.<system>.agent-ephemeral-rootfs`: an agent container's switch from a
# persistent root to nspawn's `--ephemeral`, through the real hive-priv unit
# (nix/host-modules/hive-priv.nix, sandbox included). The container is an
# agent stand-in: the real agent user module (nix/agent-modules/user.nix) on a
# plain NixOS container, with the binds hive-c0re passes for an agent.
# agent stand-in: the real agent user and nix-builds modules (nix/agent-modules)
# on a plain NixOS container, with the binds hive-c0re passes for an agent.
#
# What it pins:
# - hive-priv's `WriteNspawnFlags` salvages the persistent root before it
@ -142,7 +142,10 @@ pkgs.testers.runNixOSTest {
privateNetwork = true;
hostBridge = bridge;
config = {
imports = [ ../agent-modules/user.nix ];
imports = [
../agent-modules/user.nix
../agent-modules/nix-builds.nix
];
system.stateVersion = "25.11";
services.hyperhive.agent.user.name = agent;
# The agent's forwarder reads /var/log/journal, which journald only
@ -156,7 +159,10 @@ pkgs.testers.runNixOSTest {
privateNetwork = true;
hostBridge = bridge;
config = {
imports = [ ../agent-modules/user.nix ];
imports = [
../agent-modules/user.nix
../agent-modules/nix-builds.nix
];
system.stateVersion = "25.11";
services.hyperhive.agent.user = {
name = nsAgent;
@ -164,6 +170,8 @@ pkgs.testers.runNixOSTest {
gid = 1000;
privateUsers = true;
};
# The mode the test also sends in the nspawn flags request below.
services.hyperhive.agent.nixBuilds = "none";
};
};
};