Skip to content

Commit

Permalink
add nix and direnv configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
stepchud committed Jul 10, 2024
1 parent 24e27de commit bd45808
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mkdir -p .nix-mix
mkdir -p .nix-hex

export LANG=en_US.UTF-8
export ERL_AFLAGS="-kernel shell_history enabled"

use nix

export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex

PATH_add $MIX_HOME/bin
PATH_add $HEX_HOME/bin
45 changes: 45 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib ? import <lib> {},
pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/tarball/nixos-24.05){
config.allowUnfree = true;
}
}:

let


# define packages to install with special handling for OSX
basePackages = [
pkgs.gnumake
pkgs.gcc
pkgs.readline
pkgs.zlib
pkgs.libxml2
pkgs.libiconv
pkgs.openssl
pkgs.git
pkgs.python3

pkgs.postgresql

pkgs.elixir_1_16
pkgs.nodejs_18
pkgs.yarn
pkgs.license_finder

pkgs.gh
pkgs.ripgrep
pkgs.jq
];

inputs = basePackages
++ [ pkgs.bashInteractive ]
++ pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.inotify-tools ]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);

in pkgs.mkShell {
buildInputs = inputs;
}

0 comments on commit bd45808

Please sign in to comment.