arch-dev-elixir
Arch Linux Elixir development environment study
- Introduction
- Setup
- 1. Vagrant
- 2. Install packages
- Add package repository
- [Update and install
yaourt,git,postgresql,fishet cetera] (#update-and-install-yaourt-git-postgresql-fish-et-cetera) - Configure
fishshell - Configure postgresql
- 3. Language installation
- 4. Install Neovim and plugins
- Arch Linux
- Neovim
- Elixir Resources
- License
Introduction
Summary
arch-dev-elixir is a development environment made for exploring and studying
the Elixir language and ecosystem.
Choices in tooling
| OPERATING SYSTEM | TEXT EDITOR | UI |
|---|---|---|
| Arch Linux | Neovim | CLI |
Setup
1. Vagrant
arch-dev-elixir runs inside a virtual machine that has been built with
Vagrant.
Installation
There are many different virtualization platforms that are compatible with Vagrant. The default option is VirtualBox and should be installed alongside Vagrant.
Download or clone repository
$ git clone https://github.com/bramkok/arch-dev-elixir.gitBoot the environment
Change to the directory arch-dev-elixir and run vagrant up.
$ cd arch-dev-elixir && vagrant upConnect via SSH
When the installation is finished and the machine is running, connect to the machine via SSH.
$ vagrant ssh2. Install packages
Add package repository
Open the Pacman configuration file.
$ sudo vi /etc/pacman.confAdd the following repository at the end of the file.
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$archThen save the file and close the editor.
Update and install yaourt, git, postgresql, fish et cetera
$ sudo pacman -Sy --noconfirm yaourt git xsel fish postgresql inotify-toolsConfigure fish shell
# Change default shell to the `fish` shell
# When asked for a password use "vagrant"
$ chsh -s /usr/bin/fish
# Exit the current ssh session and reconnect again
$ exit
$ vagrant ssh
# Install a plugin manager for `fish`
$ curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisher
# Install fish plugins with `fisher`
$ fisher mono z edc/bass pyenv git vibrantConfigure postgresql
3. Language installation
Install pyenv and python
# Install pyenv
$ yaourt -Sa --noconfirm pyenv
# Install Python 3.5.1
$ pyenv install 3.5.1
# Set Python 3.5.1 as global default
$ pyenv global 3.5.1
# Reload pyenv plugin for `fish`
$ source ~/.config/fish/conf.d/pyenv.fishInstall nvm and node
# Install nvm
$ yaourt -Sa --noconfirm nvm
# Install fish plugin
$ fisher install nvm
# Create directory
$ mkdir ~/.nvm
# Symlink nvm script
$ ln -s /usr/share/nvm/init-nvm.sh ~/.nvm/nvm.sh
# Install Node.js 6.3.0
$ nvm install v6.3.0
# Set Node.js 6.3.0 as global default
$ nvm nvm alias default v6.3.0Install erlang and elixir
$ yaourt -S --noconfirm erlang elixir4. Install Neovim and plugins
Install nvim and client-neovim
# Install Neovim
$ yaourt -S --noconfirm neovim
# Install Python 3 client for neovim
$ pip3 install --user --upgrade neovimArch Linux
Commands
Package management
Installing packages
Quick search + install.
$ yaourt [keywords]Install package, Compile it from AUR if needed.
$ yaourt -S [packages]Search on repos and on AUR (with notice for already installed packages).
$ yaourt -Ss [keywords]Install packages by compiling from source (abs).
$ yaourt -Sb [packages]Prompt for packages of the selected repos (emphasize those already installed).
$ yaourt -Sl [repos]Colorized ouput of installed packages and the repos where they come from.
$ yaourt -Qs [keywords]Shows the package which provides the program or the file.
$ yaourt -Qo [progname] or [filename]Updating packages
Complete update of all Community, Core and Extra repositories.
$ yaourt -SyComplete update of all repositories + AUR repositories.
$ yaourt -SyaUpgrading packages
Complete update and upgrade of all Community, Core and Extra repositories.
$ yaourt -SyuComplete update and upgrade of all repositories + AUR repositories.
$ yaourt -SyauOriginal base box
The Arch Linux x86_64 Vagrant base box bugyt/archlinux has been used as the
starting point for this environment.
GitHub
Atlas
Release information
- Current ArchLinux Release: 2016.01.01
- Included Kernel: 4.3.3
- Details
- Virtual Hard Disk Capacity 20GB, Dynamically allocated
- Base package
- Base devel package
- Grub
- Pacman package manager
- OpenSSH
- Users and passwords
- root / vagrant
- vagrant / vagrant (Public Key authentication with Insecure Keypair , password-less sudo)
- VirtualBox Guest Additions (for Virtualbox version)
- Network File System (NFS)
- rsync
- bash-completion
- bash customizations
Modified base box
See packages and modifications in those steps.
Neovim
Elixir Resources
Ecosystem
Package management
Application configuration
Database
A database wrapper and language integrated query for Elixir
Web frameworks
Phoenix Framework
Other
Testing
- Hound
- ex_machina Create test data for Elixir applications
- Wallaby Concurrent browser tests with elixir
- Blitzy
Code analysis and styleguides
A community driven style guide for Elixir.
A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
Statistics and Metrics
Statistics and Metrics library for Elixir.
Data generation
Articles and blogs
- Elixir Diary
- http://nithinbekal.com/posts/elixir-publish-package
- https://github.com/kblake/functional-programming
- http://learningelixir.joekain.com/posts/
Example projects
Misc
Game of Life
Conway's game of life in Elixir.
Dev environments
Neovim plugins
- https://github.com/elixir-lang/vim-elixir
- https://github.com/awetzel/elixir.nvim
- https://github.com/jadercorrea/elixir_generator.vim
- https://github.com/avdgaag/vim-phoenix
License
MIT © Bram Kok