2024-05-29 08:10:10 +00:00
|
|
|
{ self, ... }:
|
2024-03-07 12:30:53 +00:00
|
|
|
{
|
2024-03-17 18:48:49 +00:00
|
|
|
perSystem =
|
|
|
|
{
|
2024-05-29 08:10:10 +00:00
|
|
|
nodes,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
dependencies = [
|
|
|
|
pkgs.disko
|
|
|
|
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.toplevel
|
|
|
|
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.diskoScript
|
2024-05-29 10:28:39 +00:00
|
|
|
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.diskoScript.drvPath
|
2024-05-29 08:10:10 +00:00
|
|
|
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.clan.deployment.file
|
|
|
|
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
|
|
|
|
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# Currently disabled...
|
2024-05-29 10:28:39 +00:00
|
|
|
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux) {
|
2024-05-29 08:10:10 +00:00
|
|
|
flash = (import ../lib/test-base.nix) {
|
|
|
|
name = "flash";
|
|
|
|
nodes.target = {
|
|
|
|
virtualisation.emptyDiskImages = [ 4096 ];
|
|
|
|
virtualisation.memorySize = 3000;
|
|
|
|
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
|
|
|
|
environment.etc."install-closure".source = "${closureInfo}/store-paths";
|
2024-03-07 12:30:53 +00:00
|
|
|
|
2024-05-29 08:10:10 +00:00
|
|
|
nix.settings = {
|
|
|
|
substituters = lib.mkForce [ ];
|
|
|
|
hashed-mirrors = null;
|
|
|
|
connect-timeout = lib.mkForce 3;
|
|
|
|
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
|
|
|
|
experimental-features = [
|
|
|
|
"nix-command"
|
|
|
|
"flakes"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
2024-05-29 10:28:39 +00:00
|
|
|
|
|
|
|
machine.succeed("clan flash --debug --flake ${../..} --yes --disk main /dev/vdb test_install_machine")
|
2024-05-29 08:10:10 +00:00
|
|
|
'';
|
|
|
|
} { inherit pkgs self; };
|
|
|
|
};
|
2024-03-07 12:30:53 +00:00
|
|
|
};
|
|
|
|
}
|