lib/modules: move modules out of lib

This commit is contained in:
Johannes Kirschbauer
2025-10-21 19:35:50 +02:00
parent 0d088cac7e
commit 346e3d816a
42 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,49 @@
{ self, inputs, ... }:
let
inputOverrides = self.clanLib.flake-inputs.getOverrides inputs;
in
{
perSystem =
{
pkgs,
lib,
system,
...
}:
let
# Common filtered source for inventory tests
inventoryTestsSrc = lib.fileset.toSource {
root = ../../../..;
fileset = lib.fileset.unions [
../../../../flake.nix
../../../../flake.lock
(lib.fileset.fileFilter (file: file.name == "flake-module.nix") ../../../..)
../../../../flakeModules
../../../../lib
../../../../nixosModules/clanCore
../../../../machines
../../../../inventory.json
];
};
in
{
# Run: nix-unit --extra-experimental-features flakes --flake .#legacyPackages.x86_64-linux.<attrName>
legacyPackages.evalTests-distributedServices = import ./tests {
inherit lib;
clanLib = self.clanLib;
};
checks = {
eval-lib-distributedServices = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
export HOME="$(realpath .)"
nix-unit --eval-store "$HOME" \
--extra-experimental-features flakes \
--show-trace \
${inputOverrides} \
--flake ${inventoryTestsSrc}#legacyPackages.${system}.evalTests-distributedServices
touch $out
'';
};
};
}