Merge pull request 'inventory: unify modules' (#5154) from inventory-unify into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5154
This commit is contained in:
hsjobeki
2025-09-16 09:02:24 +00:00
5 changed files with 12 additions and 9 deletions

View File

@@ -231,11 +231,7 @@ in
inventory = lib.mkOption {
type = types.submoduleWith {
modules = [
{
_module.args = { inherit clanLib; };
_file = "clan interface";
}
../inventoryClass/interface.nix
clanLib.inventory.inventoryModule
];
};
description = ''

View File

@@ -7,10 +7,10 @@ let
in
{
inherit (services) mapInstances;
interface = {
_file = "clanLib.inventory.interface";
inventoryModule = {
_file = "clanLib.inventory.module";
imports = [
../inventoryClass/interface.nix
../inventoryClass/inventory.nix
];
_module.args = { inherit clanLib; };
};

View File

@@ -13,7 +13,7 @@ let
(evalModules {
# Static modules
modules = [
clanLib.inventory.interface
clanLib.inventory.inventoryModule
{
_file = "test file";
tags.all = [ ];

View File

@@ -1,3 +1,7 @@
# This module describes
# - clanInternals.inventoryClass.inventory
# - clan.inventory
# Which is the public interface for the inventory system
{
lib,
clanLib,

View File

@@ -1,3 +1,6 @@
# This file is imported into:
# - clan.meta
# - clan.inventory.meta
{ lib, ... }:
let
types = lib.types;