add treefmt

This commit is contained in:
GTrunSec 2022-04-02 15:40:44 -07:00
parent 91d1041e06
commit f5d82afca7
No known key found for this signature in database
GPG key ID: 2368FAFA4ABDD2A0
11 changed files with 147 additions and 103 deletions

View file

@ -4,4 +4,19 @@
}:
pkgs.devshell.mkShell {
imports = [(pkgs.devshell.importTOML ./devshell.toml)];
packages = [
pkgs.shfmt
pkgs.nodePackages.prettier
pkgs.nodePackages.prettier-plugin-toml
pkgs.alejandra
];
commands = [
{
package = pkgs.treefmt;
}
];
devshell.startup.nodejs-setuphook = pkgs.lib.stringsWithDeps.noDepEntry ''
export NODE_PATH=${pkgs.nodePackages.prettier-plugin-toml}/lib/node_modules:$NODE_PATH
'';
}

View file

@ -8,20 +8,7 @@ eval = "$DEVSHELL_ROOT/kubeconfig.json"
[devshell]
name = "kubenix"
packages = [
"fd",
"dive",
"alejandra",
"kube3d",
"kubie",
"k9s",
]
[[commands]]
name = "fmt"
help = "Check Nix formatting"
category = "checks"
command = "alejandra ${@} ."
packages = ["fd", "dive", "kube3d", "kubie", "k9s"]
[[commands]]
name = "evalnix"
@ -41,4 +28,3 @@ category = "k8s"
[[commands]]
package = "k9s"
category = "k8s"