Setting Up My Containerized Environment
This article is a continuation to the Securely Isolating Development Environments for Agentic Workflows article. It is not necessarily intended for anybody else, though it is publicly available in case anybody wants to take inspiration or know more about the tools that I use.
YAY (Yet Another Package Manager)
I prefer to use YAY over pacman in Arch. Realistically, there aren't too many reasons other than familiarity at this point. Though, YAY makes it simple to install user repositories - which has historically been more difficult with pacman.
The instructions for installing YAY can be found on their GitHub page.
To install, you will need to install git and base-devel using pacman.
sudo pacman -S --needed git base-devel
Once that is done, you can clone the yay repository and build build it using
makepkg. Generally for any third party packages I use on a system level, if
they aren't installed via the package manager, then I put them in a packages
directory within my home directory.
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Upgrade & Install System Packages
Now that you have yay installed and it is ready to use, you can now update
the system and install some of our pre-requisite libraries.
yay -Syu
yay -Sy base base-devel sudo neovim zsh git curl ripgrep openssh
Setup SSH key for GitHub
In order to generate an SSH key for GitHub, you will need to have openssh
installed.
In your home directory, create a .ssh directory and cd into it. Generate an
SSH key using ssh-keygen replacing the email with the email you use for
GitHub. Feel free to name the file whatever you would like or name it
meaningfully.
ssh-keygen -t ed25519 -C "your_email@example.com"
Once done, you need to copy the public ssh key value to your clipboard and go to your GitHub Settings and add it to your SSH and GPG keys.
Neovim Setup
I have my Neovim configuration saved in a git repository on GitHub and they are publicly available.
Pull in the most recent Neovim configuration
dotfiles and save them to
the .config directory.
git clone git@github.com:Be-Like/neovim-configuration.git ~/.config/nvim
Setup ZSH
I have seen people save their ZSH configuration to a repository for convenient setup. For myself, I have never found it to be any more convenient than just setting it up each time myself. Each environment is unique. There may be common things shared across environments, such as aliases and/or themes, but I have found it easier to just save those somewhere for convenient copy/pasting.
If you haven't already, you can install ZSH using yay and then set it as your
default shell.
yay -Sy zsh
chsh -s $(which zsh)
Alternatively, you can set the terminal for a given user by directly modifying
the /etc/passwd.
Install Rust (optional)
Install Rust using rustup. Documentation for this can be found on Rust's Documentation.
Defaults are generally fine when installing here.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Once completed, restart the shell.
Install GPS
If you haven't used anything more than GitHub and branch development, then this is going to be a revelation for you. Git was built on the idea of developing your code as patches. You make a logical change, you create a commit, once a set of commits are ready for review, you send the commits for review as a patch stack.
GPS is a utility library aimed at making organizing your patches in a logical
manner and allows you to develop against the main/master branch.
The master mind behind Git Patch Stack is Drew De Ponte. Drew hosts all his projects himself. You can find all his projects on his site. For Git Patch Stack, you can find the instructions for installation on the Git Patch Stack documentation page.
For myself, I like to build from source.
git clone git://git.drewdeponte.com/git-ps-rs.git
Once cloned, you can install it from source.
cd git-ps-rs
cargo build --release
Once built, you need to navigate to the executable and relocate it to a location within you execution path.
cd target/release
mv /usr/local/bin
If you would like to have shell completion, you can go to the GPS Installation Guide to learn how.
cargo install frum
cargo install gps
Install Ruby
I prefer to use rbenv to manage my Ruby versions. It is an older tool, but it has been reliable and an infrequently used tool.
To install rbenv, navigate to the home directory's packages directory.
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
~/.rbenv/bin/rbenv init
Prior to installing Ruby, we are going to need to install libyaml as it is
a dependency of Ruby.
yay -Sy libyaml
Then, use rbenv to install any ruby versions that may be needed. Optionally,
you can set a global Ruby version.
rbenv install -l
rbenv install <insert_latest_version>
rbenv global <insert_latest_version>