Merge pull request 'chore: add pre-commit and just' (#19) from various_qol_things into main
All checks were successful
build and publish containers / build (nixos, 24.11) (push) Successful in 5m21s
build and publish containers / build (nixos, unstable) (push) Successful in 5m19s

Reviewed-on: #19
This commit is contained in:
flyinggecko 2025-05-23 23:39:07 +02:00
commit 58f4db9e5b
4 changed files with 21 additions and 5 deletions

13
.pre-commit-config.yaml Normal file
View 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

View file

@ -248,7 +248,6 @@
f pkgs
);
treefmtEval = forEachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
# treefmtWrapper = pkgs: treefmtEval.${pkgs.system}.config.build.wrapper;
in
{
packages = {
@ -258,8 +257,6 @@
# dev shells in project
devShells = import ./shell.nix { inherit nixpkgs treefmtEval system; };
# formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
}
);
}

6
justfile Normal file
View file

@ -0,0 +1,6 @@
hook-install:
pre-commit install --install-hooks
fmt:
treefmt

View file

@ -7,9 +7,9 @@
let
pkgs = nixpkgs.legacyPackages.${system};
packages = with pkgs; [
podman
direnv
git
pre-commit
just
];
in
{