feat: unit tests

This commit is contained in:
Ryan Yin
2024-03-13 14:47:36 +08:00
parent be963c0642
commit fff6ad6bff
17 changed files with 142 additions and 59 deletions

View File

@@ -52,6 +52,9 @@ in {
# add attribute sets into outputs, for debugging
debugAttrs = {inherit nixosSystems darwinSystems allSystems allSystemNames;};
# Unit Tests for all NixOS systems.
unitTests = lib.lists.all (it: it.unitTests == {}) nixosSystemValues;
# NixOS Hosts
nixosConfigurations =
lib.attrsets.mergeAttrsList (map (it: it.nixosConfigurations or {}) nixosSystemValues);
@@ -89,9 +92,6 @@ in {
# Unit Tests, Intergraded Tests, and Pre-commit checks
checks = forAllSystems (
system: {
# Unit Tests for the system
# unit-tests = allSystems.${system}.unit-tests;
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {