mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-13 10:44:34 +02:00
flake: partition dev dependencies
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
This commit is contained in:
parent
0ab9947137
commit
6d10fc0c87
16 changed files with 366 additions and 285 deletions
|
@ -1,21 +1,22 @@
|
|||
{ lib, inputs, ... }:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./devshell.nix
|
||||
./list-plugins
|
||||
]
|
||||
++ lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule
|
||||
++ lib.optional (inputs.treefmt-nix ? flakeModule) inputs.treefmt-nix.flakeModule;
|
||||
imports = [
|
||||
./devshell.nix
|
||||
./list-plugins
|
||||
./package-tests.nix
|
||||
./template-tests.nix
|
||||
./tests.nix
|
||||
inputs.git-hooks.flakeModule
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
lib.optionalAttrs (inputs.treefmt-nix ? flakeModule) {
|
||||
{
|
||||
treefmt.config = {
|
||||
projectRootFile = "flake.nix";
|
||||
flakeCheck = true;
|
||||
|
@ -66,8 +67,7 @@
|
|||
formatter.ruff-format.options = [ "--isolated" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (inputs.git-hooks ? flakeModule) {
|
||||
|
||||
pre-commit = {
|
||||
# We have a treefmt check already, so this is redundant.
|
||||
# We also can't run the test if it includes running `nix build`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue