flake-parts: Almost done with yggdrasil

This commit is contained in:
Christoph Hollizeck 2025-10-28 00:17:33 +01:00
parent d579c8ad2c
commit ebc8a545c8
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
43 changed files with 2650 additions and 135 deletions

View file

@ -0,0 +1,50 @@
{
inputs,
lib,
...
}:
{
imports = [
inputs.treefmt-nix.flakeModule
inputs.git-hooks.flakeModule
];
perSystem =
{ self', ... }:
{
treefmt = {
projectRootFile = "flake.nix";
programs = {
deadnix.enable = true;
jsonfmt.enable = true;
nixfmt.enable = true;
prettier.enable = true;
shfmt.enable = true;
statix.enable = true;
yamlfmt.enable = true;
};
settings = {
on-unmatched = "fatal";
global.excludes = [
"*.envrc"
".editorconfig"
"*.directory"
"*.face"
"*.fish"
"*.png"
"*.toml"
"*.svg"
"*.xml"
"*/.gitignore"
"_to_migrate/*"
"LICENSE"
];
};
};
pre-commit.settings.hooks.nix-fmt = {
enable = true;
entry = lib.getExe self'.formatter;
};
};
}