move nixBuilds into its own agent module, and have the vm test's agent import it
This commit is contained in:
parent
f930571e38
commit
d5eb7711e6
1 changed files with 88 additions and 46 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue