-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
56 lines (56 loc) · 1.52 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix.url = "github:numtide/treefmt-nix";
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
nixd.url = "github:nix-community/nixd";
rustacean.url = "github:mrcjkb/rustaceanvim";
devenv.url = "github:cachix/devenv";
alejandra.url = "github:kamadorueda/alejandra";
statix.url = "github:oppiliappan/statix";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
zig-overlay.url = "github:mitchellh/zig-overlay";
};
outputs = inputs @ {
flake-parts,
nixpkgs,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = with inputs; [
devenv.flakeModule
treefmt-nix.flakeModule
];
perSystem = {
self',
inputs',
pkgs,
system,
config,
lib,
...
}: {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = with inputs; [
fenix.overlays.default
zig-overlay.overlays.default
];
};
devenv = import ./flakeModules/devenv-shells.nix {
inherit self' inputs' pkgs system lib;
inherit (config) treefmt;
};
treefmt = import ./flakeModules/treefmt.nix {inherit self' inputs' pkgs system lib;};
};
};
}