feat: add lib.mkFleet for external flake consumption
- Create lib/mkFleet.nix to expose fleet generator as library function
- Allow external flakes to use Athenix's fleet logic with custom inventory
- Export lib output in flake.nix with proper input passing
- Enable usage: nixosConfigurations = athenix.lib.mkFleet { fleet = ...; hwTypes = ...; }
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
fleet = import ./glue/fleet.nix { inherit inputs; };
|
||||
fleet = self.lib.mkFleet { inherit inputs; };
|
||||
linuxSystem = "x86_64-linux";
|
||||
artifacts = import ./installer/artifacts.nix {
|
||||
inherit inputs fleet self;
|
||||
@@ -90,11 +90,14 @@
|
||||
nixosConfigurations = fleet.nixosConfigurations;
|
||||
|
||||
# Expose artifacts to all systems, but they are always built for x86_64-linux
|
||||
packages = forAllSystems (_: artifacts);
|
||||
packages.${linuxSystem} = artifacts;
|
||||
|
||||
# Expose host type modules and installer modules for external use
|
||||
nixosModules = import ./installer/modules.nix { inherit inputs; };
|
||||
|
||||
# Library functions
|
||||
lib = import ./lib { inherit inputs; };
|
||||
|
||||
# Templates for external configurations
|
||||
templates = import ./templates;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user