test-fixtures: move to devFlake

This commit is contained in:
Michael Hoang
2025-09-25 22:33:55 +02:00
parent 01baa46b36
commit dc66321a72
8 changed files with 101 additions and 68 deletions

View File

@@ -2,6 +2,7 @@
config,
self,
lib,
privateInputs,
...
}:
{
@@ -69,9 +70,7 @@
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript.drvPath
]
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
++ builtins.map (import ../installation/facter-report.nix) (
lib.filter (lib.hasSuffix "linux") config.systems
);
++ builtins.map (i: i.outPath) (builtins.attrValues privateInputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{

View File

@@ -1,10 +0,0 @@
system:
builtins.fetchurl {
url = "https://git.clan.lol/clan/test-fixtures/raw/commit/4a2bc56d886578124b05060d3fb7eddc38c019f8/nixos-vm-facter-json/${system}.json";
sha256 =
{
aarch64-linux = "sha256:1rlfymk03rmfkm2qgrc8l5kj5i20srx79n1y1h4nzlpwaz0j7hh2";
x86_64-linux = "sha256:16myh0ll2gdwsiwkjw5ba4dl23ppwbsanxx214863j7nvzx42pws";
}
.${system};
}

View File

@@ -28,7 +28,7 @@
lib.map (
system:
lib.nameValuePair "test-install-machine-${system}" {
facter.reportPath = import ./facter-report.nix system;
facter.reportPath = privateInputs.test-fixtures + /nixos-vm-facter-json/${system}.json;
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
@@ -151,7 +151,6 @@
let
closureInfo = pkgs.closureInfo {
rootPaths = [
privateInputs.clan-core-for-checks
self.nixosConfigurations."test-install-machine-${pkgs.hostPlatform.system}".config.system.build.toplevel
self.nixosConfigurations."test-install-machine-${pkgs.hostPlatform.system}".config.system.build.initialRamdisk
self.nixosConfigurations."test-install-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript
@@ -160,7 +159,7 @@
pkgs.buildPackages.xorg.lndir
]
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
++ builtins.map (import ./facter-report.nix) (lib.filter (lib.hasSuffix "linux") config.systems);
++ builtins.map (i: i.outPath) (builtins.attrValues privateInputs);
};
in
pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {

View File

@@ -1,6 +1,6 @@
{
self,
config,
privateInputs,
...
}:
{
@@ -30,7 +30,7 @@
nodes = {
actual =
{ pkgs, lib, ... }:
{ pkgs, ... }:
let
dependencies = [
pkgs.stdenv.drvPath
@@ -38,9 +38,7 @@
self.nixosConfigurations.test-morph-machine.config.system.build.toplevel
]
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
++ builtins.map (import ../installation/facter-report.nix) (
lib.filter (lib.hasSuffix "linux") config.systems
);
++ builtins.map (i: i.outPath) (builtins.attrValues privateInputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in

View File

@@ -1,4 +1,4 @@
{ self, config, ... }:
{ self, privateInputs, ... }:
{
# Machine for update test
clan.machines.test-update-machine = {
@@ -105,7 +105,6 @@
perSystem =
{
pkgs,
lib,
...
}:
{
@@ -125,9 +124,7 @@
pkgs.bubblewrap
]
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
++ builtins.map (import ../installation/facter-report.nix) (
lib.filter (lib.hasSuffix "linux") config.systems
);
++ builtins.map (i: i.outPath) (builtins.attrValues privateInputs);
};
in
self.clanLib.test.containerTest {