-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
99 lines (92 loc) · 2.4 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
{
# Nix: https://nixos.org/download.html
# How to activate flakes: https://nixos.wiki/wiki/Flakes
# For seamless integration, consider using:
# - direnv: https://github.com/direnv/direnv
# - nix-direnv: https://github.com/nix-community/nix-direnv
#
# # .envrc
# use flake
# dotenv .env
#
description = "Storm Software's Reaper development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};
outputs = inputs@{
self,
nixpkgs,
rust-overlay,
flake-parts,
crane,
systems,
flake-utils,
pre-commit-hooks,
...
}: let
inherit (nixpkgs.lib) optional concatStringsSep;
systems = flake-utils.lib.system;
flake = flake-utils.lib.eachDefaultSystem (system: let
overlays = [
(self: super: rec {
nodejs = super.nodejs_20;
pnpm = super.nodePackages.pnpm;
prettier = super.nodePackages.prettier;
})
];
pkgs = import nixpkgs {inherit overlays system;};
pkgs_chromium = import nixpkgs {inherit system;};
packages = with pkgs; [
# TypeScript
node2nix
nodejs
pnpm
# Rust
rustup
# Development tools
prettier
git
typos
alejandra
# Native SSL
openssl
pkg-config
cmake
# SQLx macros
libiconv
];
in {
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import systems;
perSystem = { config, system, pkgs, craneLib, ... }: {
config._module.args.flakeInputs = inputs;
imports = [
./nix/args.nix
./nix/shell.nix
./apps/eth-engine/nix/eth-engine.nix
];
}
}
})
}