chore: add nix

This commit is contained in:
r0chd 2026-09-09 01:51:29 +02:00
parent 0a16d339a4
commit 499f13a634
No known key found for this signature in database
7 changed files with 334 additions and 0 deletions

17
nix/formatter.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, rustToolchain }:
pkgs.writeShellApplication {
name = "nix3-fmt-wrapper";
runtimeInputs = builtins.attrValues {
inherit (pkgs)
nixfmt
taplo
fd
;
inherit rustToolchain;
};
text = ''
fd "$@" -t f -e nix -x nixfmt -q '{}'
fd "$@" -t f -e toml -x taplo format '{}'
cargo fmt
'';
}