initial commit
This commit is contained in:
46
devenv.nix
Normal file
46
devenv.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# https://devenv.sh/packages/
|
||||
packages = [
|
||||
pkgs.bash
|
||||
pkgs.elixir
|
||||
pkgs.erlang
|
||||
pkgs.postgresql
|
||||
pkgs.hex
|
||||
pkgs.rebar3
|
||||
] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.inotify-tools pkgs.libnotify ];
|
||||
|
||||
|
||||
env = {
|
||||
PGHOST = "localhost";
|
||||
PGPORT = "5432";
|
||||
PGUSER= "postgres";
|
||||
PGPASSWORD = "postgres";
|
||||
ERL_AFLAGS = "-kernel shell_history enabled";
|
||||
MIX_REBAR3 = "${pkgs.rebar3.outPath}/bin/rebar3";
|
||||
};
|
||||
|
||||
enterShell = ''
|
||||
export MIX_HOME="$PWD/.nix-mix"
|
||||
export HEX_HOME="$PWD/.nix-hex"
|
||||
mkdir -p "$MIX_HOME"
|
||||
mkdir -p "$HEX_HOME"
|
||||
export ESBUILD_PATH=${pkgs.esbuild}/bin/esbuild
|
||||
[[ "$PATH" =~ "$MIX_HOME/bin" ]] || export PATH="$MIX_HOME/bin:$PATH"
|
||||
[[ "$PATH" =~ "$HEX_HOME/bin" ]] || export PATH="$HEX_HOME/bin:$PATH"
|
||||
'';
|
||||
|
||||
|
||||
# https://devenv.sh/languages/
|
||||
languages.elixir.enable = true;
|
||||
# languages.nix.enable = true;
|
||||
|
||||
# https://devenv.sh/pre-commit-hooks/
|
||||
# pre-commit.hooks.shellcheck.enable = true;
|
||||
|
||||
# https://devenv.sh/processes/
|
||||
# processes.ping.exec = "ping example.com";
|
||||
|
||||
# See full reference at https://devenv.sh/reference/options/
|
||||
}
|
||||
Reference in New Issue
Block a user