nixos-config/modules/devtools.nix

69 lines
1.6 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
2024-12-05 22:26:52 +00:00
gh
2024-11-08 03:59:57 +00:00
go
gopls
kubectl
kubernetes-helm
lua-language-server
nil
2024-12-05 22:26:52 +00:00
nix-prefetch-github
2024-11-08 03:59:57 +00:00
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-12-05 22:26:52 +00:00
programs.git = {
enable = true;
config = {
alias.up = "push";
alias.dn = "pull";
alias.sh = "show";
alias.glog = "log --all --decorate --oneline --graph";
alias.glogl = "log --all --decorate --oneline --graph -n10";
alias.logl = "log --oneline -n10";
alias.vlog = "log --name-status";
core.pager = "less -x1,5";
pull.ff = "only";
init.defaultBranch = "main";
};
};
2024-10-26 06:16:31 +00:00
};
}