Hi, I’m Erika Rowland (a.k.a. erikareads). Hi, I’m Erika. I’m an Ops-shaped Software Engineer, Toolmaker, and Resilience Engineering fan. I like Elixir and Gleam, Reading, and Design. She/Her. Constellation Webring Published on

Nix

Basic shell.nix snippet

{pkgs ? import <nixpkgs> {}}:
with pkgs; let
in
  mkShell {
    buildInputs = [
      elixir
      rebar3
      erlang_26
      gleam
    ];
  }

nix fmt a file

In order to use nix fmt, I needed to have a flake.nix with a specification for the formatterThis snippet comes from here. Retrieved 2024-04-20:

{
  outputs = { nixpkgs, self }: {
    formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
  };
}

Then I can invoke a file like this:

nix fmt shell.nix

Constellation Webring