1
0
forked from extern/nix-config

meta: Add treefmt

This commit is contained in:
Donovan Glover 2023-06-12 03:48:15 -04:00
parent 797c0e8ec4
commit 5e65df256a
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 9 additions and 0 deletions

View File

@ -63,6 +63,7 @@ let VARIABLES = import ../../src/variables.nix; in {
vm = /* fish */ ''cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && nixos-rebuild build-vm --flake . --verbose && ./result/bin/run-${VARIABLES.hostname}-vm && trash put result ${VARIABLES.hostname}.qcow2''; vm = /* fish */ ''cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && nixos-rebuild build-vm --flake . --verbose && ./result/bin/run-${VARIABLES.hostname}-vm && trash put result ${VARIABLES.hostname}.qcow2'';
sw = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && sudo nixos-rebuild switch --flake . --verbose"; sw = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local && sudo nixos-rebuild switch --flake . --verbose";
st = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local"; st = "cd ~/nix-config && crystal spec tests/main.cr --progress --verbose --tag local";
tf = "treefmt";
c = "tput clear"; # Clear the terminal completely c = "tput clear"; # Clear the terminal completely
e = "exit"; e = "exit";

8
treefmt.toml Normal file
View File

@ -0,0 +1,8 @@
[formatter.crystal]
command = "crystal"
options = ["tool", "format"]
includes = [ "*.cr" ]
[formatter.nix]
command = "nixpkgs-fmt"
includes = [ "*.nix" ]