-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
67 lines (61 loc) · 1.66 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
{
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/16e046229f3b4f53257973a5532bcbb72457d2f2";
nixpkgs-2411.url = "nixpkgs/nixos-24.11";
atomipkgs.url = "github:kirinnee/test-nix-repo/v28.0.0";
};
outputs =
{ self
# utils
, flake-utils
, treefmt-nix
, pre-commit-hooks
# registries
, atomipkgs
, nixpkgs
, nixpkgs-2411
} @inputs:
(flake-utils.lib.eachDefaultSystem
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-2411 = nixpkgs-2411.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-2411 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;
}
)
)
;
}