Inventory: move to lib.inventory

This commit is contained in:
Johannes Kirschbauer 2024-06-24 21:28:45 +02:00 committed by hsjobeki
parent 6378a96b4d
commit 3aa7a6ee69
16 changed files with 11 additions and 11 deletions

View File

@ -53,8 +53,6 @@
./nixosModules/flake-module.nix ./nixosModules/flake-module.nix
./pkgs/flake-module.nix ./pkgs/flake-module.nix
./templates/flake-module.nix ./templates/flake-module.nix
./inventory/flake-module.nix
]; ];
} }
); );

View File

@ -33,7 +33,7 @@ let
mergedInventory = mergedInventory =
(lib.evalModules { (lib.evalModules {
modules = [ modules = [
./interface.nix clan-core.lib.inventory.interface
{ inherit meta; } { inherit meta; }
( (
if if
@ -77,7 +77,7 @@ let
]; ];
}).config; }).config;
buildInventory = import ./inventory.nix { inherit lib clan-core; }; inherit (clan-core.lib.inventory) buildInventory;
# map from machine name to service configuration # map from machine name to service configuration
# { ${machineName} :: Config } # { ${machineName} :: Config }

View File

@ -6,6 +6,7 @@
}: }:
{ {
evalClanModules = import ./eval-clan-modules { inherit clan-core nixpkgs lib; }; evalClanModules = import ./eval-clan-modules { inherit clan-core nixpkgs lib; };
inventory = import ./inventory { inherit lib clan-core; };
jsonschema = import ./jsonschema { inherit lib; }; jsonschema = import ./jsonschema { inherit lib; };
modules = import ./description.nix { inherit clan-core lib; }; modules = import ./description.nix { inherit clan-core lib; };
buildClan = import ./build-clan { inherit clan-core lib nixpkgs; }; buildClan = import ./build-clan { inherit clan-core lib nixpkgs; };

View File

@ -78,6 +78,7 @@ in
}; };
options.services = lib.mkOption { options.services = lib.mkOption {
default = { };
type = t.attrsOf ( type = t.attrsOf (
t.attrsOf ( t.attrsOf (
t.submodule { t.submodule {

View File

@ -0,0 +1,5 @@
{ lib, clan-core }:
{
buildInventory = import ./build-inventory { inherit lib clan-core; };
interface = ./build-inventory/interface.nix;
}

View File

@ -1,11 +1,6 @@
{ ... }:
{ {
inputs, # flake.inventory = import ./default.nix { inherit inputs self lib; };
self,
lib,
...
}:
{
flake.inventory = import ./default.nix { inherit inputs self lib; };
perSystem = perSystem =
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {