forked from tembleking/kube-helper-ai-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
61 lines (56 loc) · 1.77 KB
/
flake.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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
poetry2nix-flake.url = "github:nix-community/poetry2nix";
utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
poetry2nix-flake,
utils,
}:
utils.lib.eachDefaultSystem (
system:
let
pythonVersion = pkgs.python3; # <- Your python version here, in case you want a different one. For example, one of: python3, python310, python311, python312, etc
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ poetry2nix-flake.overlays.default ];
crossSystem = "x86_64-linux";
};
helm_with_plugins =
with pkgs;
wrapHelm kubernetes-helm {
# https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=kubernetes-helmPlugins
plugins = with kubernetes-helmPlugins; [
helm-diff # Required for `helm diff` and `helmfile apply`
];
};
helmfile_with_plugins = pkgs.helmfile-wrapped.override { inherit (helm_with_plugins) pluginsDir; };
pipelines_image = pkgs.callPackage ./pipelines_image.nix { };
in
{
packages = {
miner = pkgs.callPackage ./miner_image.nix { };
default = pipelines_image;
};
devShells.default =
with pkgs;
mkShellNoCC {
packages = [
(poetry2nix.mkPoetryEnv {
projectDir = self;
python = python3;
})
poetry
helm_with_plugins
helmfile_with_plugins
];
};
formatter = pkgs.alejandra;
}
);
}