fix: Refactor flake structure to properly use flake-parts

- Remove incorrect parts/fleet-data.nix import from flake.nix
- Create flake-parts wrappers for fleet-option.nix and users.nix
- Import inventory.nix through fleet-option wrapper
- Fix module argument passing (remove pkgs from mkFleet call)
- Move NixOS-specific modules out of flake-parts imports

This addresses the 'path does not exist' error but introduces infinite recursion that needs to be resolved.
This commit is contained in:
UGA Innovation Factory
2026-01-13 16:28:31 -05:00
parent acbc7518e8
commit 854882cbb9
4 changed files with 19 additions and 5 deletions

View File

@@ -76,6 +76,7 @@
imports = [
./parts/formatter.nix
./parts/lib.nix
./parts/fleet-option.nix
./parts/nixos-configurations.nix
./parts/nixos-modules.nix
./parts/packages.nix

9
parts/fleet-option.nix Normal file
View File

@@ -0,0 +1,9 @@
# Flake-parts wrapper for fleet-option.nix
{ inputs, self, lib, config, ... }:
let
fleetModule = import ../fleet/fleet-option.nix { inherit inputs lib; };
inventoryModule = import ../inventory.nix { };
in
{
imports = [ fleetModule inventoryModule ];
}

View File

@@ -1,12 +1,9 @@
# NixOS configurations generated from fleet
{ inputs, self, lib, pkgs, config, ... }:
{ inputs, self, lib, config, ... }:
{
imports = [
(import ../fleet/fleet-option.nix { inherit inputs lib pkgs config; })
];
flake.nixosConfigurations =
let
fleet = self.lib.mkFleet { inherit inputs lib pkgs config; };
fleet = self.lib.mkFleet { inherit inputs lib config; };
in
fleet.nixosConfigurations;
}

7
parts/users.nix Normal file
View File

@@ -0,0 +1,7 @@
# Flake-parts wrapper for users.nix
{ inputs, ... }:
let
# Minimal pkgs just for shell paths - will be overridden in actual NixOS configs
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
in
import ../users.nix { inherit pkgs; }