Add nix env

This commit is contained in:
Ryan Pandya 2024-09-06 11:31:33 -07:00
parent 210506b5ec
commit c3148f5064
2 changed files with 34 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

33
flake.nix Normal file
View File

@ -0,0 +1,33 @@
{
description = "Nix-flake Elixir development environment for Eltx";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
inherit (pkgs.lib) optional optionals;
pkgs = import nixpkgs { inherit system; };
elixir = pkgs.beam.packages.erlang.elixir;
in
with pkgs;
{
devShell = pkgs.mkShell {
buildInputs = [
bashInteractive
elixir
elixir_ls
nodejs
glibcLocales
#flyctl
] ++ optional stdenv.isLinux inotify-tools
++ optional stdenv.isDarwin terminal-notifier
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
};
});
}