Commit b5defd8
authored
refactor(nix): migrate from flake-utils to flake-parts (#250)
* fix(ci): move install to nix action
* refactor(nix): migrate from flake-utils to flake-parts
Replace flake-utils with flake-parts for a more modular and type-safe
Nix flake configuration. flake-parts uses the NixOS module system
pattern, providing better extensibility and composability.
Key changes:
- Replace flake-utils input with flake-parts
- Use mkFlake with perSystem pattern instead of eachDefaultSystem
- Explicitly declare supported systems (x86_64-linux, aarch64-linux,
aarch64-darwin)
- Remove x86_64-darwin from supported systems as it is no longer needed
Benefits of flake-parts:
- NixOS-style module system for flake configuration
- Type-safe options with better error messages
- Support for advanced features like partitions and flakeModules
- More maintainable structure for complex flake configurations
* feat(nix): add nixfmt-rfc-style to dev dependencies and lefthook
Add nixfmt-rfc-style as a development dependency in the Nix flake and
configure lefthook to automatically format .nix files on pre-commit.
Uses `nix develop --command` to run nixfmt from the devShell context,
ensuring consistent Nix code formatting across the project.1 parent 2f0660d commit b5defd8
3 files changed
+55
-44
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
19 | 17 | | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | | - | |
31 | | - | |
| 38 | + | |
32 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
0 commit comments