feat: use treefmt-nix and split up flake.nix

This commit is contained in:
Jalil David Salamé Messina 2024-10-26 13:23:22 +02:00
parent 442601f25a
commit c81d7af356
Signed by: jalil
GPG key ID: F016B9E770737A0B
8 changed files with 284 additions and 256 deletions

32
flake-modules/default.nix Normal file
View file

@ -0,0 +1,32 @@
{ inputs, ... }:
{
imports = [
inputs.treefmt-nix.flakeModule
./package.nix
./overlay.nix
./module.nix
];
perSystem =
{ pkgs, ... }:
{
# Setup formatters
treefmt = {
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
rustfmt.enable = true;
statix.enable = true;
typos.enable = true;
};
};
devShells.default = pkgs.mkShellNoCC {
packages = [
pkgs.cargo-insta
pkgs.cargo-udeps
pkgs.mold
];
};
};
}