fix: Remove incorrect ./parts/fleet-data.nix import from flake.nix and use correct flake-parts structure
This commit is contained in:
62
flake.nix
62
flake.nix
@@ -4,7 +4,7 @@
|
||||
# ============================================================================
|
||||
# This file defines the inputs (dependencies) and outputs (configurations)
|
||||
# for Athenix. It ties together the hardware, software, and user
|
||||
# configurations into deployable systems.
|
||||
# configurations into deployable systems using flake-parts.
|
||||
|
||||
inputs = {
|
||||
# Core NixOS package repository (Release 25.11)
|
||||
@@ -13,6 +13,12 @@
|
||||
# Older kernel packages for Surface compatibility if needed
|
||||
nixpkgs-old-kernel.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
|
||||
# Flake-parts for modular flake organization
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Home Manager for user environment management
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
@@ -54,51 +60,27 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-old-kernel,
|
||||
home-manager,
|
||||
disko,
|
||||
agenix,
|
||||
lazyvim-nixvim,
|
||||
nixos-hardware,
|
||||
vscode-server,
|
||||
nixos-generators,
|
||||
...
|
||||
}:
|
||||
let
|
||||
fleet = self.lib.mkFleet { inherit inputs; };
|
||||
linuxSystem = "x86_64-linux";
|
||||
artifacts = import ./installer/artifacts.nix {
|
||||
inherit inputs fleet self;
|
||||
system = linuxSystem;
|
||||
};
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
# Support all common systems
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
in
|
||||
{
|
||||
# Formatter for 'nix fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
||||
|
||||
# Generate NixOS configurations from fleet generator
|
||||
nixosConfigurations = fleet.nixosConfigurations;
|
||||
|
||||
# Expose artifacts to all systems, but they are always built for x86_64-linux
|
||||
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;
|
||||
# Import flake-parts modules
|
||||
imports = [
|
||||
./parts/formatter.nix
|
||||
./parts/lib.nix
|
||||
./parts/fleet-data.nix
|
||||
./parts/nixos-configurations.nix
|
||||
./parts/nixos-modules.nix
|
||||
./parts/packages.nix
|
||||
./parts/templates.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user