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:
@@ -76,6 +76,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./parts/formatter.nix
|
./parts/formatter.nix
|
||||||
./parts/lib.nix
|
./parts/lib.nix
|
||||||
|
./parts/fleet-option.nix
|
||||||
./parts/nixos-configurations.nix
|
./parts/nixos-configurations.nix
|
||||||
./parts/nixos-modules.nix
|
./parts/nixos-modules.nix
|
||||||
./parts/packages.nix
|
./parts/packages.nix
|
||||||
|
|||||||
9
parts/fleet-option.nix
Normal file
9
parts/fleet-option.nix
Normal 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 ];
|
||||||
|
}
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
# NixOS configurations generated from fleet
|
# 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 =
|
flake.nixosConfigurations =
|
||||||
let
|
let
|
||||||
fleet = self.lib.mkFleet { inherit inputs lib pkgs config; };
|
fleet = self.lib.mkFleet { inherit inputs lib config; };
|
||||||
in
|
in
|
||||||
fleet.nixosConfigurations;
|
fleet.nixosConfigurations;
|
||||||
}
|
}
|
||||||
|
|||||||
7
parts/users.nix
Normal file
7
parts/users.nix
Normal 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; }
|
||||||
Reference in New Issue
Block a user