flake: use the correct formatter for Nix; suppress deno output

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic39d3a2448cd4b4f241909779f7ead596a6a6964
This commit is contained in:
raf 2025-12-18 16:36:42 +03:00
commit 797748a20c
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -71,10 +71,12 @@
text = '' text = ''
# Find Nix files in the tree and format them with Alejandra # Find Nix files in the tree and format them with Alejandra
fd "$@" -t f -e nix -x nixfmt -q '{}' echo "Formatting Nix files"
fd "$@" -t f -e nix -x alejandra -q '{}'
# Same for Markdown files, but with deno # Same for Markdown files, but with deno
fd "$@" -t f -e md -x deno fmt '{}' echo "Formatting Markdown files"
fd "$@" -t f -e md -x deno fmt -q '{}'
''; '';
}; };
@ -93,7 +95,7 @@
# This can be initiated with `nix build .#checks.<system>.md-fmt` # This can be initiated with `nix build .#checks.<system>.md-fmt`
# or with `nix flake check` # or with `nix flake check`
md-fmt = pkgs.runCommand "md-fmt-check" {nativeBuildInputs = [pkgs.deno];} '' md-fmt = pkgs.runCommand "md-fmt-check" {nativeBuildInputs = [pkgs.deno];} ''
deno fmt --check ${self} --ext md < /dev/null deno fmt --check ${self} --ext md
touch $out touch $out
''; '';
}; };