-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
executable file
·66 lines (61 loc) · 1.7 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
{
inputs = {
# util
flake-utils.url = "github:numtide/flake-utils";
treefmt-nix.url = "github:numtide/treefmt-nix";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
# registry
nixpkgs.url = "nixpkgs/5e0ca22929f3342b19569b21b2f3462f053e497b";
nixpkgs-240810.url = "nixpkgs/5e0ca22929f3342b19569b21b2f3462f053e497b";
atomipkgs.url = "github:kirinnee/test-nix-repo/v28.0.0";
};
outputs =
{ self
# utils
, flake-utils
, treefmt-nix
, pre-commit-hooks
# registries
, atomipkgs
, nixpkgs
, nixpkgs-240810
} @inputs:
(flake-utils.lib.eachDefaultSystem
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-240810 = nixpkgs-240810.legacyPackages.${system};
atomi = atomipkgs.packages.${system};
pre-commit-lib = pre-commit-hooks.lib.${system};
in
with rec {
pre-commit = import ./nix/pre-commit.nix {
inherit packages pre-commit-lib formatter;
};
formatter = import ./nix/fmt.nix {
inherit treefmt-nix pkgs;
};
packages = import ./nix/packages.nix
{
inherit pkgs pkgs-240810 atomi;
};
env = import ./nix/env.nix {
inherit pkgs packages;
};
devShells = import ./nix/shells.nix {
inherit pkgs env packages;
shellHook = checks.pre-commit-check.shellHook;
};
checks = {
pre-commit-check = pre-commit;
format = formatter;
};
};
{
inherit checks formatter packages devShells;
}
)
)
;
}