flake.nix: refactoring using flake-parts

This commit is contained in:
Gaetan Lepage 2023-12-06 13:09:26 +01:00 committed by Gaétan Lepage
parent 1f1065df1e
commit 31284ddabe
13 changed files with 320 additions and 202 deletions

29
flake-modules/dev.nix Normal file
View file

@ -0,0 +1,29 @@
{inputs, ...}: {
imports = [
inputs.pre-commit-hooks.flakeModule
];
perSystem = {
pkgs,
config,
...
}: {
devShells.default = pkgs.mkShellNoCC {
shellHook = config.pre-commit.installationScript;
};
formatter = pkgs.alejandra;
pre-commit = {
settings.hooks = {
alejandra.enable = true;
statix = {
enable = true;
excludes = [
"plugins/lsp/language-servers/rust-analyzer-config.nix"
];
};
};
};
};
}