Compare commits

...

4 Commits

25 changed files with 36 additions and 17 deletions

View File

@@ -2,15 +2,18 @@ BUILD_COMMIT = $(shell git rev-parse HEAD)
BASE_IMAGE = registry.fedoraproject.org/fedora-toolbox
BASE_IMAGE_VERSION = $(shell cat /etc/os-release | grep VERSION_ID | cut -d = -f 2)
REPOSITORY = localhost/toolbox-dev-env
STARSHIP_COLOR = $(shell cat starship.$(HOSTNAME).color)
STARSHIP_COLOR = $(shell cat shell/starship.$(HOSTNAME).color)
.PHONY: container
container:
podman build ./container/ --tag $(REPOSITORY):$(BUILD_COMMIT) --build-arg BASE_IMAGE="$(BASE_IMAGE)" --build-arg BASE_IMAGE_VERSION="$(BASE_IMAGE_VERSION)" --build-arg BUILD_COMMIT="$(BUILD_COMMIT)"
.PHONY: toolbox
toolbox:
podman build ./toolbox/ --tag $(REPOSITORY):$(BUILD_COMMIT) --build-arg BASE_IMAGE="$(BASE_IMAGE)" --build-arg BASE_IMAGE_VERSION="$(BASE_IMAGE_VERSION)" --build-arg BUILD_COMMIT="$(BUILD_COMMIT)"
podman tag $(REPOSITORY):$(BUILD_COMMIT) $(REPOSITORY):latest
.PHONY: container
scripts:
systemctl --user enable podman.socket --now
systemctl --user enable podman.service --now
.PHONY: shell
shell:
mkdir --parents ~/.local/share/fonts/
curl -sSLo ~/.local/share/fonts/nerdfont.zip https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/AdwaitaMono.zip
unzip -o ~/.local/share/fonts/nerdfont.zip -d ~/.local/share/fonts/
@@ -22,14 +25,14 @@ scripts:
sh /tmp/starship.sh --yes --bin-dir=$(HOME)/.local/bin
mkdir --parents ~/.config/bashrc.d
cp scripts.d/*.sh ~/.config/bashrc.d/
cp shell/scripts.d/*.sh ~/.config/bashrc.d/
mkdir --parents ~/.config/completions.d
cp completions.d/*.completion ~/.config/completions.d/
cp shell/completions.d/*.completion ~/.config/completions.d/
cp bashrc.sh ~/.bashrc
cp inputrc ~/.inputrc
cp starship.toml ~/.config/starship.toml
cp shell/bashrc.sh ~/.bashrc
cp shell/inputrc ~/.inputrc
cp shell/starship.toml ~/.config/starship.toml
sed -i "s/#XXXXXX/$(STARSHIP_COLOR)/g" ~/.config/starship.toml
.PHONY: vscodium
@@ -43,7 +46,6 @@ vscodium:
podman stop vscodium-setup-temp
podman rm vscodium-setup-temp
install: container scripts
systemctl --user enable podman.sock --now
systemctl --user enable podman.service --now
.PHONY: install
install: toolbox shell vscodium;

View File

@@ -1,5 +1,22 @@
# toolbox dev env
# local dev env
My personal development environment for using [Toolbox](https://containertoolbx.org/) containers.
My personal development environment for using [Toolbox](https://containertoolbx.org/) containers, VSCodium,
and custom shell configuration:
To install, run `make install`. To update the image use `make build` and then recreate any running toolbox containers.
* Toolbox
* Build a custom Toolbox container image with all my stuff in it
* Enable the podman socket to allow running containers via podman from within Toolbox
* Shell
* Add custom bash aliases
* Install a nerd font
* Install starship
* Add custom bash script `dev` for loading dev tools in a toolbox container
* Disable case-sensitive tab completion
* Configure starship prompt
* VSCodium
* _Note that VSCodium is installed in the toolbox container, not on the host_
* Copy settings and keybindings
* Install and update specified extensions
Use `make toolbox|shell|vscodium` for installation of specific components, or `make install` to install all
components.