Compare commits
No commits in common. "4a1eb8d3f9c6c9297e50ce77301cba59af846130" and "3139bab32f046e8f43e4c263d05bbc91b4bebbe3" have entirely different histories.
4a1eb8d3f9
...
3139bab32f
1 changed files with 43 additions and 54 deletions
97
flake.nix
97
flake.nix
|
@ -24,69 +24,58 @@
|
|||
packages = with pkgs; [
|
||||
corepack_latest
|
||||
nodejs
|
||||
cargo
|
||||
clippy
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
packages = forSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = pkgs' system;
|
||||
in
|
||||
{
|
||||
fmt = pkgs.treefmt.withConfig {
|
||||
runtimeInputs = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
nodePackages.prettier
|
||||
rustfmt
|
||||
];
|
||||
settings = {
|
||||
tree-root-file = ".git/index";
|
||||
formatter = {
|
||||
nixfmt = {
|
||||
command = "nixfmt";
|
||||
includes = [ "*.nix" ];
|
||||
};
|
||||
rustfmt = {
|
||||
command = "rustfmt";
|
||||
options = [
|
||||
"--edition"
|
||||
"2018"
|
||||
];
|
||||
includes = [ "*.rs" ];
|
||||
};
|
||||
prettier = {
|
||||
command = "prettier";
|
||||
options = [ "--write" ];
|
||||
excludes = [ "pnpm-lock.yaml" ];
|
||||
includes = [
|
||||
"*.css"
|
||||
"*.html"
|
||||
"*.js"
|
||||
"*.json"
|
||||
"*.jsx"
|
||||
"*.md"
|
||||
"*.mdx"
|
||||
"*.scss"
|
||||
"*.ts"
|
||||
"*.yaml"
|
||||
"*.yml"
|
||||
"*.vue"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
formatter = forSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = pkgs' system;
|
||||
in
|
||||
self.outputs.packages.${system}.fmt
|
||||
pkgs.treefmt.withConfig {
|
||||
runtimeInputs = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
nodePackages.prettier
|
||||
rustfmt
|
||||
];
|
||||
settings = {
|
||||
tree-root-file = ".git/index";
|
||||
formatter = {
|
||||
nixfmt = {
|
||||
command = "nixfmt";
|
||||
includes = [ "*.nix" ];
|
||||
};
|
||||
rustfmt = {
|
||||
command = "rustfmt";
|
||||
options = [
|
||||
"--edition"
|
||||
"2018"
|
||||
];
|
||||
includes = [ "*.rs" ];
|
||||
};
|
||||
prettier = {
|
||||
command = "prettier";
|
||||
options = [ "--write" ];
|
||||
excludes = [ "pnpm-lock.yaml" ];
|
||||
includes = [
|
||||
"*.css"
|
||||
"*.html"
|
||||
"*.js"
|
||||
"*.json"
|
||||
"*.jsx"
|
||||
"*.md"
|
||||
"*.mdx"
|
||||
"*.scss"
|
||||
"*.ts"
|
||||
"*.yaml"
|
||||
"*.yml"
|
||||
"*.vue"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue