Skip to content

Commit

Permalink
Clean up flake using devenv modules
Browse files Browse the repository at this point in the history
  • Loading branch information
starcraft66 committed Apr 18, 2024
1 parent b77b731 commit 9a155f9
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
};
};

devenv.shells.default = let
inherit (pkgs.lib) optional optionals;
erlang = pkgs.beam.interpreters.erlangR25;
elixir = pkgs.beam.packages.erlangR26.elixir_1_15;
rebar = pkgs.rebar3;
nodejs = pkgs.nodejs_20;
in {
devenv.shells.default = {
languages.elixir.enable = true;
languages.elixir.package = pkgs.beam.packages.erlangR26.elixir_1_16;
languages.erlang.enable = true;
languages.erlang.package = pkgs.beam.interpreters.erlangR26;
languages.javascript.enable = true;
languages.javascript.yarn.enable = true;
services.postgres = {
enable = true;
initialDatabases = [ { name = "lanpartyseating_dev"; } ];
Expand All @@ -79,14 +79,8 @@
'';
listen_addresses = "::1,127.0.0.1";
};
env.MIX_REBAR3 = "${rebar}/bin/rebar3";
env.MIX_REBAR3 = "${pkgs.rebar3}/bin/rebar3";
env.MIX_ESBUILD_PATH = "${pkgs.esbuild}/bin/esbuild";
packages = with pkgs; [ cacert git erlang elixir rebar cargo nodejs yarn elixir-ls ]
++ optional stdenv.isLinux inotify-tools
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
enterShell = ''
alias mdg="mix deps.get"
alias mps="mix phx.server"
Expand Down

0 comments on commit 9a155f9

Please sign in to comment.