-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
101 lines (84 loc) · 2.68 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
description = "hydra-explorer application and system image";
inputs = {
CHaP = {
url = "github:IntersectMBO/cardano-haskell-packages?ref=repo";
flake = false;
};
cardano-node.url = "github:IntersectMBO/cardano-node/9.2.0";
hydra-node.url = "github:cardano-scaling/hydra/d55c4efb896273dc39d4bdc4fc83ec361de55f73";
hackage = {
url = "github:input-output-hk/hackage.nix";
flake = false;
};
haskell-nix = {
url = "github:input-output-hk/haskell.nix";
inputs.hackage.follows = "hackage";
};
iogx = {
url = "github:input-output-hk/iogx";
inputs.hackage.follows = "hackage";
inputs.CHaP.follows = "CHaP";
inputs.haskell-nix.follows = "haskell-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-npm-buildpackage.url = "github:serokell/nix-npm-buildpackage";
nixpkgs.follows = "haskell-nix/nixpkgs";
};
outputs = inputs:
let
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
];
in
inputs.iogx.lib.mkFlake {
nixpkgsArgs.overlays = [
inputs.nix-npm-buildpackage.overlays.default
(final: prev: {
cardano-node = inputs.cardano-node.packages.${final.system}.cardano-node;
cardano-cli = inputs.cardano-node.packages.${final.system}.cardano-cli;
hydra-node = inputs.hydra-node.packages.${final.system}.hydra-node;
})
];
inherit inputs;
inherit systems;
repoRoot = ./.;
flake = _: {
nixosConfigurations.hydra-explorer =
inputs.nixpkgs.lib.nixosSystem
{
system = "x86_64-linux";
specialArgs = inputs;
modules = [
{
imports = [
"${inputs.nixpkgs}/nixos/modules/virtualisation/amazon-image.nix"
(import ./nix/hydra-explorer-configuration.nix {
cardano-node-module = inputs.cardano-node.nixosModules.cardano-node;
hydra-explorer = inputs.self.packages.x86_64-linux.hydra-explorer;
hydra-explorer-web = inputs.self.packages.x86_64-linux.hydra-explorer-web;
})
];
}
];
};
};
outputs = import ./nix/outputs.nix;
};
nixConfig = {
extra-substituters = [
"https://cache.iog.io"
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
allow-import-from-derivation = true;
};
}