Skip to content

Commit 13b057d

Browse files
committed
enforce formatting of nix files
1 parent 8bb83cc commit 13b057d

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

devenv.nix

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{ pkgs, config, inputs, ... }:
22
let
3-
pkgs-unstable = import inputs.nixpkgs-unstable { system = pkgs.stdenv.system; config.allowUnfree = true; };
4-
in
5-
{
3+
pkgs-unstable = import inputs.nixpkgs-unstable {
4+
system = pkgs.stdenv.system;
5+
config.allowUnfree = true;
6+
};
7+
in {
68

79
languages.elm.enable = true;
810

@@ -24,28 +26,30 @@ in
2426
check-merge-conflicts.enable = true;
2527
check-shebang-scripts-are-executable.enable = true;
2628
check-yaml.enable = true;
27-
typos.enable = true;
2829
deadnix.enable = true;
2930
detect-private-keys.enable = true;
31+
nixfmt.enable = true;
3032
ripsecrets.enable = true;
33+
typos.enable = true;
3134

3235
trim-trailing-whitespace.enable = true;
33-
trim-trailing-whitespace.excludes = [".elm-land/"];
36+
trim-trailing-whitespace.excludes = [ ".elm-land/" ];
3437

3538
end-of-file-fixer.enable = true;
36-
end-of-file-fixer.excludes = [".elm-land/"];
39+
end-of-file-fixer.excludes = [ ".elm-land/" ];
3740

3841
shellcheck.enable = true;
39-
shellcheck.excludes = [".yml" ".yaml"];
42+
shellcheck.excludes = [ ".yml" ".yaml" ];
4043

4144
denofmt.enable = true;
42-
denofmt.excludes = ["elm.json" "review/elm.json" "elm-land.json" ".elm-land/"];
45+
denofmt.excludes =
46+
[ "elm.json" "review/elm.json" "elm-land.json" ".elm-land/" ];
4347

4448
elm-format.enable = true;
45-
elm-format.excludes = [".elm-land/" "src/Evergreen"];
49+
elm-format.excludes = [ ".elm-land/" "src/Evergreen" ];
4650

4751
elm-review.enable = true;
48-
elm-review.excludes = [".elm-land/"];
52+
elm-review.excludes = [ ".elm-land/" ];
4953
};
5054

5155
enterShell = ''
@@ -56,16 +60,13 @@ in
5660
elm-test-rs --compiler $(which lamdera)
5761
'';
5862

59-
60-
processes =
61-
if !config.devenv.isTesting
62-
then
63-
{
64-
elm-land.exec = "elm-land server";
65-
lamdera.exec = "lamdera live";
66-
tailwind.exec = "tailwindcss -i ./src/style.css -o ./public/style.css --watch";
67-
}
68-
else {};
63+
processes = if !config.devenv.isTesting then {
64+
elm-land.exec = "elm-land server";
65+
lamdera.exec = "lamdera live";
66+
tailwind.exec =
67+
"tailwindcss -i ./src/style.css -o ./public/style.css --watch";
68+
} else
69+
{ };
6970

7071
scripts.lint.exec = "pre-commit run --all-files";
7172
scripts.tests.exec = "elm-test-rs --compiler $(which lamdera)";

0 commit comments

Comments
 (0)