This repository was archived by the owner on Jul 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
57 lines (49 loc) · 1.35 KB
/
Copy pathflake.nix
File metadata and controls
57 lines (49 loc) · 1.35 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
54
55
56
57
{
description = "development shell for k8s";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
};
outputs = {
nixpkgs,
flake-utils,
...
} @ inputs: (flake-utils.lib.eachDefaultSystem
(
system: let
pkgs = nixpkgs.legacyPackages.${system};
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {};
};
ksops = pkgs.kustomize-sops.overrideAttrs (old: {
installPhase = ''
runHook preInstall
mkdir -p $out
dir="$GOPATH/bin"
mv "$dir/kustomize-sops" "$dir/ksops"
[ -e "$dir" ] && cp -r $dir $out
runHook postInstall
'';
});
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.kustomize
pkgs.helm
pkgs.argocd
ksops
];
NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
pkgs.openssl
];
NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
shellHook = ''
${pre-commit-check.shellHook}
'';
};
}
));
}