forked from fediversity/fediversity
mv nixos-test-base from common to non-proxmox tests
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
parent
b242670cfc
commit
0cd7a523d0
7 changed files with 51 additions and 27 deletions
|
|
@ -4,6 +4,7 @@
|
|||
pkgs,
|
||||
config,
|
||||
sources,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -73,17 +74,20 @@ in
|
|||
## configuration and the store paths needed to build it and
|
||||
## dump them in `system.extraDependencies`.
|
||||
machine =
|
||||
(pkgs.nixos [
|
||||
./targetNode.nix
|
||||
../../../infra/common/nixos/repart.nix
|
||||
config.system.extraDependenciesFromModule
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
_module.args = { inherit inputs sources; };
|
||||
enableAcme = config.enableAcme;
|
||||
acmeNodeIP = config.acmeNodeIP;
|
||||
}
|
||||
]).config;
|
||||
(pkgs.nixos (
|
||||
[
|
||||
./targetNode.nix
|
||||
../../../infra/common/nixos/repart.nix
|
||||
config.system.extraDependenciesFromModule
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
_module.args = { inherit inputs sources; };
|
||||
enableAcme = config.enableAcme;
|
||||
acmeNodeIP = config.acmeNodeIP;
|
||||
}
|
||||
]
|
||||
++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix")
|
||||
)).config;
|
||||
|
||||
in
|
||||
[
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
config,
|
||||
hostPkgs,
|
||||
sources,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -67,16 +68,19 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
sourceFileset = fileset.unions [
|
||||
# NOTE: not the flake itself; it will be overridden.
|
||||
../../../mkFlake.nix
|
||||
../../../flake.lock
|
||||
../../../npins
|
||||
sourceFileset = fileset.unions (
|
||||
[
|
||||
# NOTE: not the flake itself; it will be overridden.
|
||||
../../../mkFlake.nix
|
||||
../../../flake.lock
|
||||
../../../npins
|
||||
|
||||
./sharedOptions.nix
|
||||
./targetNode.nix
|
||||
./targetResource.nix
|
||||
];
|
||||
./sharedOptions.nix
|
||||
./targetNode.nix
|
||||
./targetResource.nix
|
||||
]
|
||||
++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix")
|
||||
);
|
||||
|
||||
acmeNodeIP = config.nodes.acme.networking.primaryIPAddress;
|
||||
|
||||
|
|
@ -112,7 +116,9 @@ in
|
|||
};
|
||||
})
|
||||
(genAttrs config.targetMachines (_: {
|
||||
imports = [ ./targetNode.nix ];
|
||||
imports = [
|
||||
./targetNode.nix
|
||||
] ++ (lib.optional config.useFlake (modulesPath + "/../lib/testing/nixos-test-base.nix"));
|
||||
_module.args = { inherit inputs sources; };
|
||||
enableAcme = config.enableAcme;
|
||||
acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ in
|
|||
imports = [
|
||||
(modulesPath + "/profiles/minimal.nix")
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
# FIXME needed for non-proxmox tests
|
||||
# (modulesPath + "/../lib/testing/nixos-test-base.nix")
|
||||
./sharedOptions.nix
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
lib,
|
||||
config,
|
||||
sources,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -39,7 +40,7 @@ in
|
|||
imports = [
|
||||
./targetNode.nix
|
||||
(lib.modules.importJSON (config.pathToCwd + "/${config.nodeName}-network.json"))
|
||||
];
|
||||
] ++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix");
|
||||
|
||||
_module.args = { inherit inputs sources; };
|
||||
enableAcme = config.enableAcme;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,12 @@ in
|
|||
inputs.nixops4-nixos.modules.nixops4Resource.nixos
|
||||
../common/targetResource.nix
|
||||
];
|
||||
nixos.module = mkNixosConfiguration environment required-resources;
|
||||
nixos.module = {
|
||||
imports = [
|
||||
(mkNixosConfiguration environment required-resources)
|
||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
||||
];
|
||||
};
|
||||
_module.args = { inherit inputs sources; };
|
||||
inherit nodeName pathToRoot pathFromRoot;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,12 @@ in
|
|||
}:
|
||||
{
|
||||
ssh-host = {
|
||||
nixos-configuration = mkNixosConfiguration environment required-resources;
|
||||
nixos-configuration = {
|
||||
imports = [
|
||||
(mkNixosConfiguration environment required-resources)
|
||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
||||
];
|
||||
};
|
||||
system = targetSystem;
|
||||
ssh = {
|
||||
username = "root";
|
||||
|
|
|
|||
|
|
@ -31,7 +31,12 @@ in
|
|||
}:
|
||||
{
|
||||
tf-host = {
|
||||
nixos-configuration = mkNixosConfiguration environment required-resources;
|
||||
nixos-configuration = {
|
||||
imports = [
|
||||
(mkNixosConfiguration environment required-resources)
|
||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
||||
];
|
||||
};
|
||||
system = targetSystem;
|
||||
ssh = {
|
||||
username = "root";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue