-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
flake.nix
79 lines (77 loc) · 2.23 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
nixConfig = {
extra-trusted-substituters = [
"https://ai.cachix.org"
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://numtide.cachix.org"
];
extra-substituters = [
"https://ai.cachix.org"
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://numtide.cachix.org"
];
extra-trusted-public-keys = [
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
];
};
description = "A Nix Flake that makes AI reproducible and easy to run";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
hercules-ci-effects = {
url = "github:hercules-ci/hercules-ci-effects";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
flake-parts,
hercules-ci-effects,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
perSystem = { system, ... }: let
common = {
overlays = [
inputs.self.overlays.comfyui
inputs.self.overlays.models
inputs.self.overlays.fetchers
];
inherit system;
};
in {
_module.args.rocmPkgs = import inputs.nixpkgs ({
config = {
rocmSupport = true;
allowUnfree = true;
};
} // common);
_module.args.nvidiaPkgs = import inputs.nixpkgs ({
config = {
cudaSupport = true;
allowUnfree = true;
};
} // common);
_module.args.pkgs = import inputs.nixpkgs ({
} // common);
};
imports = [
./flake-modules
hercules-ci-effects.flakeModule
];
};
}