Skip to content

Commit 10d8a09

Browse files
committed
chore: update flake config
1 parent 7492100 commit 10d8a09

2 files changed

Lines changed: 127 additions & 26 deletions

File tree

flake.lock

Lines changed: 81 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@
1313
flake-parts = {
1414
url = "github:hercules-ci/flake-parts";
1515
};
16+
17+
git-hooks = {
18+
url = "github:cachix/git-hooks.nix";
19+
};
1620
};
1721

18-
outputs = inputs@{ flake-parts, ... }:
22+
outputs =
23+
inputs@{ flake-parts, ... }:
1924
flake-parts.lib.mkFlake { inherit inputs; } {
2025
imports = [
2126
inputs.devenv.flakeModule
27+
inputs.git-hooks.flakeModule
2228
];
2329

2430
systems = [
@@ -28,28 +34,49 @@
2834
"aarch64-darwin"
2935
];
3036

31-
perSystem = { config, self', inputs', pkgs, system, ... }: {
32-
imports = [
33-
{
34-
_module.args.pkgs = import inputs.nixpkgs {
35-
inherit system;
36-
config.allowUnfree = true;
37-
};
38-
}
39-
];
40-
41-
devenv = {
42-
shells = {
43-
default = {
44-
languages = {
45-
ruby = {
46-
enable = true;
47-
package = pkgs.ruby_3_3;
37+
perSystem =
38+
{
39+
config,
40+
self',
41+
inputs',
42+
pkgs,
43+
system,
44+
...
45+
}:
46+
{
47+
imports = [
48+
{
49+
_module.args.pkgs = import inputs.nixpkgs {
50+
inherit system;
51+
config.allowUnfree = true;
52+
};
53+
}
54+
];
55+
56+
devenv = {
57+
shells = {
58+
default = {
59+
git-hooks = {
60+
hooks = {
61+
nixfmt-rfc-style = {
62+
enable = true;
63+
};
64+
};
65+
};
66+
67+
languages = {
68+
ruby = {
69+
enable = true;
70+
package = pkgs.ruby_3_4;
71+
};
4872
};
73+
74+
packages = with pkgs; [
75+
nixfmt-rfc-style
76+
];
4977
};
5078
};
5179
};
5280
};
53-
};
5481
};
5582
}

0 commit comments

Comments
 (0)