Merge pull request 'chore: add pre-commit and just' (#19) from various_qol_things into main
Reviewed-on: #19
This commit is contained in:
commit
58f4db9e5b
4 changed files with 21 additions and 5 deletions
13
.pre-commit-config.yaml
Normal file
13
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v5.0.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: treefmt
|
||||||
|
name: treefmt
|
||||||
|
pass_filenames: false
|
||||||
|
entry: treefmt
|
||||||
|
language: system
|
|
@ -248,7 +248,6 @@
|
||||||
f pkgs
|
f pkgs
|
||||||
);
|
);
|
||||||
treefmtEval = forEachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
treefmtEval = forEachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||||
# treefmtWrapper = pkgs: treefmtEval.${pkgs.system}.config.build.wrapper;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
|
@ -258,8 +257,6 @@
|
||||||
|
|
||||||
# dev shells in project
|
# dev shells in project
|
||||||
devShells = import ./shell.nix { inherit nixpkgs treefmtEval system; };
|
devShells = import ./shell.nix { inherit nixpkgs treefmtEval system; };
|
||||||
|
|
||||||
# formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
6
justfile
Normal file
6
justfile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
hook-install:
|
||||||
|
pre-commit install --install-hooks
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
treefmt
|
|
@ -7,9 +7,9 @@
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
podman
|
|
||||||
direnv
|
|
||||||
git
|
git
|
||||||
|
pre-commit
|
||||||
|
just
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue