-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,5 @@ open_ai_client-*.tar | |
|
||
# Temporary files, for example, from tests. | ||
/tmp/ | ||
.nix-hex | ||
.nix-mix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
layout { | ||
default_tab_template split_direction="horizontal" { | ||
children | ||
pane size=1 borderless=true { | ||
plugin location="compact-bar" | ||
} | ||
} | ||
|
||
tab name="1 code" focus=true { | ||
pane split_direction="vertical" { | ||
pane name="editor" size="80%" focus=true command="nvim" borderless=true | ||
pane name="tests" size="20%" command="mix" { | ||
args "test.interactive" "--stale" | ||
} | ||
} | ||
} | ||
|
||
// tab name="2 servers" { | ||
// pane split_direction="vertical" { | ||
// pane name="docker" command="docker" { | ||
// args "compose" "up" | ||
// } | ||
// pane name="web" command="iex" start_suspended=true { | ||
// args "-S" "mix" "phx.server" | ||
// } | ||
// } | ||
// } | ||
|
||
tab name="2 git" { | ||
pane name="git" command="lazygit" borderless=true | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
description = "A flake for building development environment of Phoenix project."; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/master"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in | ||
with pkgs; { | ||
devShells.default = mkShell { | ||
buildInputs = [ | ||
beam.interpreters.erlang_27 | ||
beam.packages.erlang_27.elixir_1_16 | ||
nodePackages.nodejs | ||
flyctl | ||
] | ||
++ lib.optionals stdenv.isLinux [ | ||
# For ExUnit Notifier on Linux. | ||
libnotify | ||
|
||
# For file_system on Linux. | ||
inotify-tools | ||
] | ||
++ lib.optionals stdenv.isDarwin [ | ||
# For ExUnit Notifier on macOS. | ||
terminal-notifier | ||
|
||
# For file_system on macOS. | ||
darwin.apple_sdk.frameworks.CoreFoundation | ||
darwin.apple_sdk.frameworks.CoreServices | ||
]; | ||
|
||
shellHook = '' | ||
# allows mix to work on the local directory | ||
mkdir -p .nix-mix | ||
mkdir -p .nix-hex | ||
export MIX_HOME=$PWD/.nix-mix | ||
export HEX_HOME=$PWD/.nix-hex | ||
export ERL_LIBS=$HEX_HOME/lib/erlang/lib | ||
# concats PATH | ||
export PATH=$MIX_HOME/bin:$PATH | ||
export PATH=$MIX_HOME/escripts:$PATH | ||
export PATH=$HEX_HOME/bin:$PATH | ||
# enables history for IEx | ||
export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_path '\"$PWD/.erlang-history\"'" | ||
''; | ||
}; | ||
} | ||
); | ||
} |