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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue