Full Refactor and history reset
This commit is contained in:
34
scripts/new-elixir.nix
Normal file
34
scripts/new-elixir.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "new-elixir" ''
|
||||
nix-shell -p elixir --run "mix new $1 --sup"
|
||||
cd $1
|
||||
echo '
|
||||
{
|
||||
description = "$1";
|
||||
|
||||
inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
erlang = pkgs.beam.packages.erlang_26.erlang;
|
||||
elixir = pkgs.beam.packages.erlang_26.elixir;
|
||||
in {
|
||||
devShells.''${system}.default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.fswatch
|
||||
erlang
|
||||
elixir
|
||||
pkgs.inotify-tools
|
||||
pkgs.lexical
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
' > flake.nix
|
||||
echo 'use flake' > .envrc
|
||||
direnv allow
|
||||
git init
|
||||
''
|
||||
Reference in New Issue
Block a user