-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
61 lines (57 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
{
description = "Dex NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
iohkNix.url = "github:input-output-hk/iohk-nix";
cardano-node.url = "github:input-output-hk/cardano-node";
cardano-wallet.url = "github:input-output-hk/cardano-wallet/flake";
};
outputs =
{ self, nixpkgs, flake-utils, iohkNix, cardano-node, cardano-wallet, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
overlays = [
cardano-node.overlay
cardano-wallet.overlay
iohkNix.overlays.haskell-nix-extra
iohkNix.overlays.crypto
iohkNix.overlays.cardano-lib
iohkNix.overlays.utils
(final: prev: {
commonLib = nixpkgs.lib // iohkNix.lib // final.cardanoLib;
})
(import ./packages)
];
};
in {
nixosConfigurations = {
ec2-backend-byron-network = nixpkgs.lib.nixosSystem {
inherit pkgs system;
modules = [
# cardano-node.nixosModules.cardano-node
# cardano-wallet.nixosModules.cardano-wallet
# FIXME Currently this module cannot be used with below error message
# error: The option `services.cardano-node.project' does not exist. Definition values:
# - In `/nix/store/dcjyag0dk3y85zmw7zgl3igri1b50qdq-source/flake.nix'
# In flake.nix of the cardano-wallet repo it used here:
# https://github.com/input-output-hk/cardano-wallet/blob/99e679f163e5e7bb5c28bda05e419ee85415414e/flake.nix#L39
# cardano-wallet.nixosModules.cardano-wallet
./hosts # main configuration file for hosts
./roles/common # common configuration for any instance
# ./roles/services # services services configuration
./users/dex # `dex` user setup
];
};
};
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
in { devShell = pkgs.mkShell { packages = with pkgs; [ rnix-lsp ]; }; });
}