enhace devshell

This commit is contained in:
GTrunSec 2022-04-02 15:31:14 -07:00
parent d1e09b972b
commit 91d1041e06
No known key found for this signature in database
GPG key ID: 2368FAFA4ABDD2A0
5 changed files with 27 additions and 19 deletions

7
devshell/default.nix Normal file
View file

@ -0,0 +1,7 @@
{
pkgs,
inputs,
}:
pkgs.devshell.mkShell {
imports = [(pkgs.devshell.importTOML ./devshell.toml)];
}

44
devshell/devshell.toml Normal file
View file

@ -0,0 +1,44 @@
[[env]]
name = "QEMU_NET_OPTS"
value = "hostfwd=tcp::5443-:443"
[[env]]
name = "KUBECONFIG"
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 ${@} ."
[[commands]]
name = "evalnix"
help = "Check Nix parsing"
category = "checks"
command = "fd --extension nix --exec nix-instantiate --parse --quiet {} >/dev/null"
# K8s related tools
[[commands]]
package = "dive"
category = "k8s"
[[commands]]
package = "kubie"
category = "k8s"
[[commands]]
package = "k9s"
category = "k8s"