-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.nix
80 lines (55 loc) · 2 KB
/
settings.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
68
69
70
71
72
73
74
75
76
77
78
79
80
# Repo wide settings
{ lib, flake-parts-lib, inputs, ... }: {
options = {
perSystem = flake-parts-lib.mkPerSystemOption
({ system, config, ... }: {
options.settings = {
shell = {
tools = lib.mkOption {
type = lib.types.listOf lib.types.package;
description = "Tools to include in all devShells";
};
hook = lib.mkOption {
type = lib.types.str;
description = "Shell script to invoke in all devShells";
};
};
haskell = {
index-state = lib.mkOption {
type = lib.types.str;
description = "Hackage index state to use when making a haskell.nix build environment";
};
compiler-nix-name = lib.mkOption {
type = lib.types.str;
description = "GHC Haskell compiler to use when building haskell.nix projects";
};
};
};
config = {
settings = {
haskell = {
index-state = "2024-01-16T11:00:00Z";
compiler-nix-name = "ghc963";
};
shell = {
tools = [
inputs.pre-commit-hooks.outputs.packages.${system}.deadnix
inputs.pre-commit-hooks.outputs.packages.${system}.nixpkgs-fmt
inputs.pre-commit-hooks.outputs.packages.${system}.shellcheck
inputs.pre-commit-hooks.outputs.packages.${system}.typos
inputs.pre-commit-hooks.outputs.packages.${system}.markdownlint-cli
inputs.pre-commit-hooks.outputs.packages.${system}.dhall
inputs.pre-commit-hooks.outputs.packages.${system}.purty
];
hook = ''
export LC_CTYPE=C.UTF-8;
export LC_ALL=C.UTF-8;
export LANG=C.UTF-8;
${config.pre-commit.installationScript}
'';
};
};
};
});
};
}