summaryrefslogtreecommitdiff
path: root/devenv.nix
blob: fab80f91dc3915824451d814e8dabfb55e6b1f5f (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
33
34
35
{
  pkgs,
  lib,
  config,
  ...
}:
{
  # https://devenv.sh/languages/
  languages.rust.enable = true;

  # https://devenv.sh/packages/
  packages = with pkgs; [
           bacon
           wgsl-analyzer

           wayland
           libxkbcommon
           vulkan-loader
  ];

  env.LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [
           wayland
           libxkbcommon
           vulkan-loader
           libGL
  ]);

  # Format staged files on commit with treefmt; rustfmt handles Rust sources.
  treefmt.enable = true;
  treefmt.config.programs.rustfmt.enable = true;

  git-hooks.hooks.treefmt.enable = true;

  # See full reference at https://devenv.sh/reference/options/
}