nixos-config/modules/devtools.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

2024-11-08 03:59:57 +00:00
{
config,
pkgs,
lib,
...
}:
2024-10-26 06:16:31 +00:00
let
cfg = config.sconfig.devtools;
in
{
options.sconfig.devtools.enable = lib.mkEnableOption "Development Tools";
config = lib.mkIf cfg.enable {
2024-11-08 03:59:57 +00:00
environment.systemPackages = with pkgs; [
black
cargo
efm-langserver
errcheck
go
gopls
kubectl
kubernetes-helm
lua-language-server
nil
nodePackages.prettier
nodePackages.typescript-language-server
pyright
rust-analyzer
rustc
rustc.llvmPackages.lld
rustfmt
stern
terraform
terraform-ls
vscode-langservers-extracted
yaml-language-server
2024-10-26 06:30:38 +00:00
2024-11-08 03:59:57 +00:00
# dedicated script, because bash aliases dont work with `watch`
(writeShellScriptBin "k" "exec kubectl \"$@\"")
2024-10-26 06:30:38 +00:00
2024-11-08 03:59:57 +00:00
(google-cloud-sdk.withExtraComponents [ google-cloud-sdk.components.gke-gcloud-auth-plugin ])
];
2024-10-26 06:30:38 +00:00
programs.bash.interactiveShellInit = ''
2024-10-29 05:23:53 +00:00
alias t=terraform
complete -C terraform t
2024-10-26 06:30:38 +00:00
source <(kubectl completion bash)
complete -F __start_kubectl k
'';
2024-10-26 06:16:31 +00:00
};
}