forked from Effect-TS/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
56 lines (52 loc) · 1.36 KB
/
shell.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
let
flakeLock = builtins.fromJSON (builtins.readFile ./flake.lock);
nixpkgsLock = flakeLock.nodes.nixpkgs.locked;
lockedNixpkgs =
import
(fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsLock.rev}.tar.gz";
sha256 = nixpkgsLock.narHash;
})
{};
in
{pkgs ? lockedNixpkgs}: let
corepackEnable = pkgs.runCommand "corepack-enable" {} ''
mkdir -p $out/bin
${pkgs.nodejs-18_x}/bin/corepack enable --install-directory $out/bin
'';
in
with pkgs;
mkShell {
name = "nixos-shell";
# Enable experimental features without having to specify the argument
NIX_CONFIG = "extra-experimental-features = nix-command flakes repl-flake";
buildInputs = [
age
alejandra
corepackEnable
git
home-manager
kubectl
nix
nil
nodejs-18_x
pre-commit
python310Packages.pre-commit-hooks
sops
ssh-to-age
];
KUSTOMIZE_PLUGIN_HOME = pkgs.buildEnv {
name = "kustomize-plugins";
paths = [
kustomize-sops
];
postBuild = ''
mv $out/lib/* $out
rm -r $out/lib
'';
pathsToLink = ["/lib"];
};
shellHook = ''
pre-commit install
'';
}