test-fixtures: move to devFlake
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
config,
|
config,
|
||||||
self,
|
self,
|
||||||
lib,
|
lib,
|
||||||
|
privateInputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -69,9 +70,7 @@
|
|||||||
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript.drvPath
|
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript.drvPath
|
||||||
]
|
]
|
||||||
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
|
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
|
||||||
++ builtins.map (import ../installation/facter-report.nix) (
|
++ builtins.map (i: i.outPath) (builtins.attrValues privateInputs);
|
||||||
lib.filter (lib.hasSuffix "linux") config.systems
|
|
||||||
);
|
|
||||||
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
|
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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};
|
|
||||||
}
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
lib.map (
|
lib.map (
|
||||||
system:
|
system:
|
||||||
lib.nameValuePair "test-install-machine-${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";
|
fileSystems."/".device = lib.mkDefault "/dev/vda";
|
||||||
boot.loader.grub.device = lib.mkDefault "/dev/vda";
|
boot.loader.grub.device = lib.mkDefault "/dev/vda";
|
||||||
@@ -151,7 +151,6 @@
|
|||||||
let
|
let
|
||||||
closureInfo = pkgs.closureInfo {
|
closureInfo = pkgs.closureInfo {
|
||||||
rootPaths = [
|
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.toplevel
|
||||||
self.nixosConfigurations."test-install-machine-${pkgs.hostPlatform.system}".config.system.build.initialRamdisk
|
self.nixosConfigurations."test-install-machine-${pkgs.hostPlatform.system}".config.system.build.initialRamdisk
|
||||||
self.nixosConfigurations."test-install-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript
|
self.nixosConfigurations."test-install-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript
|
||||||
@@ -160,7 +159,7 @@
|
|||||||
pkgs.buildPackages.xorg.lndir
|
pkgs.buildPackages.xorg.lndir
|
||||||
]
|
]
|
||||||
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
|
++ 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
|
in
|
||||||
pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
|
pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
config,
|
privateInputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
actual =
|
actual =
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
dependencies = [
|
dependencies = [
|
||||||
pkgs.stdenv.drvPath
|
pkgs.stdenv.drvPath
|
||||||
@@ -38,9 +38,7 @@
|
|||||||
self.nixosConfigurations.test-morph-machine.config.system.build.toplevel
|
self.nixosConfigurations.test-morph-machine.config.system.build.toplevel
|
||||||
]
|
]
|
||||||
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
|
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
|
||||||
++ builtins.map (import ../installation/facter-report.nix) (
|
++ builtins.map (i: i.outPath) (builtins.attrValues privateInputs);
|
||||||
lib.filter (lib.hasSuffix "linux") config.systems
|
|
||||||
);
|
|
||||||
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
|
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ self, config, ... }:
|
{ self, privateInputs, ... }:
|
||||||
{
|
{
|
||||||
# Machine for update test
|
# Machine for update test
|
||||||
clan.machines.test-update-machine = {
|
clan.machines.test-update-machine = {
|
||||||
@@ -105,7 +105,6 @@
|
|||||||
perSystem =
|
perSystem =
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -125,9 +124,7 @@
|
|||||||
pkgs.bubblewrap
|
pkgs.bubblewrap
|
||||||
]
|
]
|
||||||
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
|
++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs)
|
||||||
++ builtins.map (import ../installation/facter-report.nix) (
|
++ builtins.map (i: i.outPath) (builtins.attrValues privateInputs);
|
||||||
lib.filter (lib.hasSuffix "linux") config.systems
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
self.clanLib.test.containerTest {
|
self.clanLib.test.containerTest {
|
||||||
|
|||||||
43
devFlake/flake.lock
generated
43
devFlake/flake.lock
generated
@@ -18,6 +18,27 @@
|
|||||||
"url": "https://git.clan.lol/clan/clan-core"
|
"url": "https://git.clan.lol/clan/clan-core"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"test-fixtures",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741352980,
|
||||||
|
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": [
|
"systems": [
|
||||||
@@ -127,6 +148,7 @@
|
|||||||
"nixpkgs-dev": "nixpkgs-dev",
|
"nixpkgs-dev": "nixpkgs-dev",
|
||||||
"nuschtos": "nuschtos",
|
"nuschtos": "nuschtos",
|
||||||
"systems": "systems_2",
|
"systems": "systems_2",
|
||||||
|
"test-fixtures": "test-fixtures",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -160,6 +182,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"test-fixtures": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs-dev"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742806412,
|
||||||
|
"narHash": "sha256-ZoAN0/sHEHY+ymJnkdkBAuZ/6sc66RYR4xMHpLf7++E=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "4a2bc56d886578124b05060d3fb7eddc38c019f8",
|
||||||
|
"revCount": 2,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.clan.lol/clan/test-fixtures"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.clan.lol/clan/test-fixtures"
|
||||||
|
}
|
||||||
|
},
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": []
|
"nixpkgs": []
|
||||||
|
|||||||
@@ -18,5 +18,8 @@
|
|||||||
inputs.clan-core-for-checks.url = "git+https://git.clan.lol/clan/clan-core?ref=main&shallow=1";
|
inputs.clan-core-for-checks.url = "git+https://git.clan.lol/clan/clan-core?ref=main&shallow=1";
|
||||||
inputs.clan-core-for-checks.flake = false;
|
inputs.clan-core-for-checks.flake = false;
|
||||||
|
|
||||||
|
inputs.test-fixtures.url = "git+https://git.clan.lol/clan/test-fixtures";
|
||||||
|
inputs.test-fixtures.inputs.nixpkgs.follows = "nixpkgs-dev";
|
||||||
|
|
||||||
outputs = inputs: inputs;
|
outputs = inputs: inputs;
|
||||||
}
|
}
|
||||||
|
|||||||
10
flake.nix
10
flake.nix
@@ -58,12 +58,16 @@
|
|||||||
src = ./devFlake;
|
src = ./devFlake;
|
||||||
}).outputs.inputs;
|
}).outputs.inputs;
|
||||||
in
|
in
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
flake-parts.lib.mkFlake
|
||||||
{ ... }:
|
|
||||||
{
|
{
|
||||||
_module.args = {
|
inherit inputs;
|
||||||
|
specialArgs = {
|
||||||
inherit privateInputs;
|
inherit privateInputs;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
(
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
clan = {
|
clan = {
|
||||||
meta.name = "clan-core";
|
meta.name = "clan-core";
|
||||||
inventory = {
|
inventory = {
|
||||||
|
|||||||
Reference in New Issue
Block a user