this repo has no description

meta: use treefmt (#3)

Reviewed-on: https://codeberg.org/comfysage/ebil/pulls/3
Co-authored-by: june <me@koi.rip>
Co-committed-by: june <me@koi.rip>

authored by koi.rip koi.rip and committed by robinwobin.dev da4329c8 859df947

+38 -3
+1 -1
.envrc
··· 1 1 if has nix; then 2 - use flake 2 + use flake 3 3 fi
+1 -1
ebil.sh
··· 66 66 name="${site%.ebil.club}" 67 67 68 68 msg 'user:' "$name" 69 - [[ -f "${path}/index.txt" ]] && msg 'custom curl message configured' "(${path}/index.txt)" 69 + [[ -f "${path}/index.txt" ]] && msg 'custom curl message configured' "(${path}/index.txt)" 70 70 71 71 msg 'pushing to' "$site" 'from' "$path" 72 72 rsync -rltzq --progress --delete --chmod=D755,F644 "${path}/" "${host}:/var/ebil.club/${name}/${site}"
+2
flake.nix
··· 23 23 }); 24 24 25 25 overlays.default = final: _: { ebil = final.callPackage ./nix/package.nix { }; }; 26 + 27 + formatter = forAllSystems (pkgs: pkgs.callPackage ./nix/formatter.nix { }); 26 28 }; 27 29 }
+29
nix/formatter.nix
··· 1 + { 2 + treefmt, 3 + nixfmt, 4 + shfmt, 5 + }: 6 + treefmt.withConfig { 7 + runtimeInputs = [ 8 + nixfmt 9 + shfmt 10 + ]; 11 + settings = { 12 + on-unmatched = "warn"; 13 + tree-root-file = "flake.nix"; 14 + formatter = { 15 + nix = { 16 + command = "nixfmt"; 17 + includes = [ "*.nix" ]; 18 + }; 19 + shfmt = { 20 + command = "shfmt"; 21 + options = [ "-w" ]; 22 + includes = [ 23 + "*.sh" 24 + ".envrc" 25 + ]; 26 + }; 27 + }; 28 + }; 29 + }
+5 -1
nix/shell.nix
··· 1 - { mkShellNoCC, shellcheck, shfmt }: 1 + { 2 + mkShellNoCC, 3 + shellcheck, 4 + shfmt, 5 + }: 2 6 mkShellNoCC { 3 7 packages = [ 4 8 shellcheck