2025-02-22 16:02:13 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
config,
|
|
|
|
partitionStack,
|
|
|
|
...
|
|
|
|
}:
|
2023-12-06 13:09:26 +01:00
|
|
|
{
|
|
|
|
imports = [
|
2025-01-19 05:35:04 +00:00
|
|
|
./flake-modules
|
2023-12-06 13:09:26 +01:00
|
|
|
./lib.nix
|
|
|
|
./legacy-packages.nix
|
2025-01-19 05:37:20 +00:00
|
|
|
./nixvim-configurations.nix
|
2023-12-06 13:09:26 +01:00
|
|
|
./overlays.nix
|
|
|
|
./packages.nix
|
|
|
|
./templates.nix
|
|
|
|
./wrappers.nix
|
2025-02-22 16:02:13 +00:00
|
|
|
inputs.flake-parts.flakeModules.partitions
|
2023-12-06 13:09:26 +01:00
|
|
|
];
|
2025-02-22 16:02:13 +00:00
|
|
|
|
|
|
|
# Define flake partitions
|
|
|
|
# Each has a `module`, assigned to the partition's submodule,
|
|
|
|
# and an `extraInputsFlake`, used for its inputs.
|
|
|
|
# See https://flake.parts/options/flake-parts-partitions.html
|
|
|
|
partitions = {
|
|
|
|
dev = {
|
|
|
|
module = ./dev;
|
|
|
|
extraInputsFlake = ./dev;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Specify which outputs are defined by which partitions
|
|
|
|
partitionedAttrs = {
|
|
|
|
checks = "dev";
|
|
|
|
devShells = "dev";
|
|
|
|
formatter = "dev";
|
|
|
|
};
|
|
|
|
|
|
|
|
# For any output attrs normally defined by the root flake configuration,
|
|
|
|
# any exceptions must be manually propagated from the `dev` partition.
|
|
|
|
#
|
|
|
|
# NOTE: Attrs should be explicitly propagated at the deepest level.
|
|
|
|
# Otherwise the partition won't be lazy, making it pointless.
|
|
|
|
# E.g. propagate `packages.${system}.foo` instead of `packages.${system}`
|
|
|
|
# See: https://github.com/hercules-ci/flake-parts/issues/258
|
|
|
|
perSystem =
|
|
|
|
{ system, ... }:
|
|
|
|
{
|
|
|
|
packages = lib.optionalAttrs (partitionStack == [ ]) {
|
|
|
|
# Propagate `packages` from the `dev` partition:
|
|
|
|
inherit (config.partitions.dev.module.flake.packages.${system})
|
|
|
|
list-plugins
|
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
2023-12-06 13:09:26 +01:00
|
|
|
}
|