-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This removes the need for end-users to manually set `nixvim.inputs.devshell.follows = ""` (etc) We offload evaluation of some of our flake modules into a `dev` partition submodule. - When its not needed, this submodule is not evaluated. - When it is needed, it fetches extra inputs from `flake/dev/flake.nix` as part of evaluating the submodule. See https://flake.parts/options/flake-parts-partitions.html
- Loading branch information
1 parent
0ab9947
commit 6d10fc0
Showing
16 changed files
with
366 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,56 @@ | ||
{ | ||
lib, | ||
inputs, | ||
config, | ||
partitionStack, | ||
... | ||
}: | ||
{ | ||
imports = [ | ||
./dev | ||
./flake-modules | ||
./lib.nix | ||
./legacy-packages.nix | ||
./nixvim-configurations.nix | ||
./overlays.nix | ||
./packages.nix | ||
./templates.nix | ||
./tests.nix | ||
./wrappers.nix | ||
inputs.flake-parts.flakeModules.partitions | ||
]; | ||
|
||
# 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 | ||
; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.