summaryrefslogtreecommitdiff
path: root/templates/full/nix/dev.nix
blob: e3197ff00179af7af4ccae2e57a884e6932aff96 (plain)
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
{
  perSystem = {
    pkgs,
    config,
    self',
    ...
  }: {
    pre-commit = {
      settings.hooks = {
        alejandra.enable = true;
        deadnix.enable = true;
        nil.enable = true;
        statix.enable = true;
      };
    };

    devShells = {
      default = pkgs.mkShell {
        shellHook = config.pre-commit.installationScript;

        packages = with pkgs; [
          self'.formatter
          deadnix
          nil
          statix
        ];
      };
    };

    formatter = pkgs.alejandra;
  };
}