Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
53 lines (45 loc) · 1.38 KB
/
Copy pathflake.nix
File metadata and controls
53 lines (45 loc) · 1.38 KB
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
{
description = "Examples dev shell (Go, kind, kubectl, helm, valkey-cli)";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
# nixpkgs dropped x86_64-darwin (Intel Macs) in 26.11
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ] (system:
let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
# Go
go
golangci-lint
gotools
# Kubernetes (kind clusters, operators, Helm charts)
kind
kubectl
kubernetes-helm
k9s
# Valkey CLI (valkey-cli)
valkey
# Utilities
jq
yq-go
gettext # provides envsubst
colorized-logs # provides ansi2txt
# LSPs
gopls
];
# Docker is not provided: use Docker Desktop, or Docker Engine on Linux.
shellHook = ''
# go install puts binaries in $HOME/go/bin
export PATH="$PATH:$HOME/go/bin"
# Load local overrides
if [ -f .env ]; then
set -a; . ./.env; set +a
fi
'';
};
});
}