Collection of nix flake templates
1{
2 description = "TODO: Describe the erlang flake";
3
4 inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
5
6 outputs =
7 { self, nixpkgs }:
8 let
9 systems = [ "x86_64-linux" ];
10 forSystems = func: nixpkgs.lib.genAttrs systems (system: func (import nixpkgs { inherit system; }));
11 in
12 {
13 formatter = forSystems (pkgs: pkgs.nixfmt-tree.override { settings.formatter.nixfmt.options = [ "-w 120" ]; });
14
15 devShells = forSystems (pkgs: {
16 default = pkgs.mkShellNoCC {
17 buildInputs = with pkgs; [
18 (with beamMinimalPackages; [
19 erlang
20 erlang-ls
21 erlfmt
22 rebar3
23 ])
24 ];
25 };
26 });
27 };
28}