refactor(nix): use flake-parts (#642)
refactor(nix): split into flake parts module and add shell.nix chore: add prettier to treefmt and pin version chore(nix): add prettier exclude chore(nix): bump pnpm to v10.18.2 feat(nix): add overlay for nodejs feat(nix): add overlay for nodejs chore: consolidate .editorconfig
This commit is contained in:
24
nix/treefmt.nix
Normal file
24
nix/treefmt.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = pkgs.lib.meta.availableOn pkgs.stdenv.buildPlatform pkgs.nixfmt-rfc-style.compiler;
|
||||
programs.nixfmt.package = pkgs.nixfmt-rfc-style;
|
||||
programs.prettier.enable = true;
|
||||
programs.shellcheck.enable = true;
|
||||
programs.yamlfmt.enable = true;
|
||||
programs.dockerfmt.enable = true;
|
||||
|
||||
settings.formatter.prettier.excludes = [ "pnpm-lock.yaml" ];
|
||||
settings.formatter.shellcheck.excludes = [ ".envrc" ];
|
||||
settings.formatter.yamlfmt.excludes = [ "pnpm-lock.yaml" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user