diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ddfdb63 --- /dev/null +++ b/flake.nix @@ -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 + ]); + }; + }); +}