refactor(tools): switch to Nix

- Nix is more reproducible (pinned to a specific hash)
- Faster rebuild after changing the package list (due to /nix caching in volume)
- Users can still use make tools (wrapped in Docker) without installing Nix
- Using nix-shell will work if you have nix installed.
This commit is contained in:
Khue Doan
2022-08-26 19:08:52 +07:00
parent 6e361596ac
commit adbaf32aa5
13 changed files with 113 additions and 91 deletions

40
shell.nix Normal file
View File

@ -0,0 +1,40 @@
# https://status.nixos.org
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/f034b5693a26625f56068af983ed7727a60b5f8b.tar.gz") {} }:
let
python-packages = pkgs.python3.withPackages (p: with p; [
jinja2
kubernetes
netaddr
rich
]);
in
pkgs.mkShell {
buildInputs = with pkgs; [
ansible
ansible-lint
bmake
diffutils
docker
docker-compose_1 # TODO upgrade to version 2
git
go
grc
iproute2
k9s
kube3d
kubectl
kubernetes-helm
kustomize
libisoburn
neovim
openssh
p7zip
pre-commit
shellcheck
terraform
yamllint
python-packages
];
}