-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
69 lines (69 loc) · 1.82 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
let
pkgs = import <nixpkgs> {};
lib = import <nixpkgs/lib>;
extensions = (with pkgs.vscode-extensions; [
bbenoist.nix
golang.go
redhat.vscode-yaml
zxh404.vscode-proto3
editorconfig.editorconfig
ms-azuretools.vscode-docker
ms-kubernetes-tools.vscode-kubernetes-tools
]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "Tiltfile";
publisher = "tilt-dev";
version = "0.0.3";
sha256 = "KQ+jmVwHH/9iqmS6mYGxZMMmVisI2FqMMCDUi9AJCcY=";
}
{
name = "vscode-bazel";
publisher = "BazelBuild";
version = "0.5.0";
sha256 = "JJQSwU3B5C2exENdNsWEcxFSgWHnImYas4t/KLsgTj4=";
}
{
name = "vscode-buf";
publisher = "bufbuild";
version = "0.5.0";
sha256 = "ePvmHgb6Vdpq1oHcqZcfVT4c/XYZqxJ6FGVuKAbQOCg=";
}
];
vscode-with-extensions = pkgs.vscode-with-extensions.override {
vscode = pkgs.vscodium;
vscodeExtensions = extensions;
};
in
pkgs.mkShell {
name="dev-environment";
buildInputs = [
pkgs.bazel-buildtools
pkgs.bazelisk
pkgs.buf
pkgs.docker
pkgs.go
pkgs.golangci-lint
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.minikube
pkgs.tilt
vscode-with-extensions
];
shellHook = '' # commands to run when you enter the shell
alias groot="git rev-parse --show-toplevel"
alias cdg="cd $(groot)"
alias code="codium"
alias codeg="code $(groot)"
alias tidy="$(groot)/tidy.sh"
alias k="kubectl"
alias mk="minikube"
echo
echo "$(tput bold)Development environment ready!$(tput sgr0)"
echo
echo "If this is a new repo, you should run $(tput setaf 13)tidy$(tput sgr0) to initialize it."
echo
echo "To run Tilt environment:"
echo " $(tput setaf 13)minikube start$(tput sgr0)"
echo " $(tput setaf 13)tilt up$(tput sgr0)"
'';
}