fix: Remove incorrect ./parts/fleet-data.nix import from flake.nix and use correct flake-parts structure

This commit is contained in:
UGA Innovation Factory
2026-01-13 16:21:20 -05:00
parent 67e7a57402
commit d34325de53
16 changed files with 257 additions and 143 deletions

65
fleet/fleet-data.nix Normal file
View File

@@ -0,0 +1,65 @@
# ============================================================================
# Fleet Data for NixOS Configurations
# ============================================================================
# This module exposes only the fleet inventory data (not hwTypes module functions)
# to individual NixOS configurations. Used by fleet/common.nix.
{ inputs, lib, ... }:
let
fleetDefinition = lib.mkOption {
description = "Hardware types definitions for the fleet.";
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
type = lib.mkOption {
type = lib.types.oneOf [
lib.types.str
lib.types.listOf lib.types.str
];
default = name;
description = "Type(s) of system configuration for this device.";
};
system = lib.mkOption {
type = lib.types.str;
default = "x86_64-linux";
description = "NixOS system architecture for this hardware type.";
};
devices = lib.mkOption {
type = lib.types.oneOf [
lib.types.int
(lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
freeformType = lib.types.attrs;
}
)
))
];
};
count = lib.mkOption {
type = lib.types.int;
default = 0;
description = "Number of devices of this type to create.";
};
defaultCount = lib.mkOption {
type = lib.types.int;
default = 0;
description = "Default number of devices to create with default configurations and numbered hostnames.";
};
overrides = lib.mkOption {
type = lib.types.attrs;
default = { };
description = "Overrides to apply to all devices of this type.";
};
};
}
)
);
};
in
{
imports = [ ../inventory.nix ];
options.athenix.fleet = fleetDefinition;
}