These are my dotfiles that I use for all my workstation and developement environments on a daily basis. I share it because I got frustrated about moving a tarball around (and being scared of losing it). This eventually happened when my notebook got stolen. It is 'very personal' (my way of working), so, this is not an ideal solution for you. Treat it as, "what you see is what it is"...
These dotfiles are based around a few helpers that deal with setting up development containers, network functions and connectivity to my homelab services
dotfiles
handles installation and update of my dotfilesdevenv,devbox
deals with running instant development environments as containers with Podmanmachine
create VMs using bootc image-based deployments of devenv, homelab, apps and others, utilizingmacadamandmachinefileproxy
sets environment to use a proxy to access servicesdavfs
connects to remote WebDAV endspoints for file sharingtailscale
aliases and commands for use with my tailnetsecrets
simple encrypt and decrypt for tokens and TOTPapp
installing and running according to application definitions as Actionfilesaction/run
automation framework using Actionfiles, a markdown-based file for script executionscreen
smart(er) handling of local and remote screen session with tmuxdotini,appini
global and local configuration of dotfiles, and applications, using the Actionfile'sconfig-block orini-files withgit configplaybook,notebook
helpers to execute and edit Ansible playbooks and Jupyter notebooks- Applications
apps,actions,devenvs,machines,services,userctl,playbooks,notebooks, ... - ...
Note
Since I continously change how I work, so do these files and scripts. Do not use this directly, but take parts and learn from it.
A Markdown-based configuration file that describes a set of actions, scripts, or tasks for use in automation workflows
A simple executor that allows you to run Dockerfile/Containerfile commands directly on a local or remote host
curl -fsSL https://dotfiles.gbraad.nl/install.sh | shNote
This script uses the stable downstream to install.
An extension that checks for and install my personal dotfiles
An extension that automates devenv.zsh and machine.zsh.
settings.json
{
"terminal.integrated.defaultProfile.linux": "dot",
"terminal.integrated.profiles.linux": {
"dot": {
// absolute path is necessary (no variables)
"path": "/home/.../.dotfiles/bash/.local/bin/dot"
},
"dotscreen": {
"path": "/home/.../.dotfiles/bash/.local/bin/dotscreen"
}
}
}tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "dot",
"type": "shell",
"problemMatcher": [],
"command": "~/.dotfiles/bash/.local/bin/dot"
//"command": "zsh" // when dot is used as default terminal
},
{
"label": "dotscreen",
"type": "shell",
"problemMatcher": [],
"command": "~/.dotfiles/bash/.local/bin/dotscreen"
//"command": "screen"
}
]
}Note
Tasks are run in the default termina. If this is set to dot, any function that has been defined, can be run directly.
Install my personal dotfiles as a feature during the devcontainer build process.
"features": {
"ghcr.io/gbraad-dotfiles/devcontainer-features/dotfiles:latest": {}
}These are container images with the dotfiles and dependencies installed, able to run as a system container.
devenv dotfedora env,dev dotfedora [system|shell|exec]for Fedoradevenv dotdebian env,dev dotdebian [system|shell|exec]for Debian- ...
dotalmafor AlmaLinux - ...
dotcentosfor CentOS Stream - ...
dotubi9for RHEL UBI9 - ...
dotubuntufor Ubuntu - ...
dotalpinefor Alpine
The machine.zsh-helper assists in the process to set up and run image-based virtual machines.
This is called a Bootable Container (bootc). Disk images are stored as OCI artifacts.
$ machine dotfiles [download|create|start|console]You can otherwise also run
$ wget https://github.com/gbraad-dotfiles/upstream/releases/download/250223/almalinux-disk.qcow2 \
-O base.qcow2
$ sudo virt-install \
--name base --os-variant fedora-eln \
--cpu host --vcpus 4 --memory 4096 \
--import --disk ./base.qcow2,format=qcow2- Fedora, with golang
- Debian, with golang
- AlmaLinux, with golang
- CentOS, with golang
- UBI9, with golang
- Ubuntu, with golang
Usage in Jupyter notebooks
%load_ext dotfiles%%dotscript
country> The Netherlands
%%dotscript
proxy ndisguise
country
> Germany
out=%dotini dotfiles file
%code out iniout=%dot ps ax
%code out%app list services
%app pinger service install
%app pinger service statusNote
To use the extension, stow ipython needs to be run. More information can be found in the dedicated
gbraad-dotfiles/notebooks repository with examples.
GitHub Action: install-action
- name: Install dotfiles action
uses: gbraad-dotfiles/install-action@mainGitHub Action: dotfiles-action
- name: Run dotfiles command
uses: gbraad-dotfiles/dotfiles-action@main
with:
action: updateGitHub Action: devenv-action
- name: Run devenv command
uses: gbraad-dotfiles/devenv-action@main
with:
prefix: dotfedora
command: exec # [create/system/noinit|start|apps|...]
args: cat /etc/os-releaseGitHub Action: devbox-action
- name: Run devbox command
uses: gbraad-dotfiles/devbox-action@main
with:
prefix: fedora
command: exec # [create|start|apps|...]
args: cat /etc/os-releaseGitHub Action: machine-action
- name: Run machine command
uses: gbraad-dotfiles/machine-action@main
with:
prefix: dotfedora
command: download # [create|start|stop|...]GitHub Action: app-action
- name: Run app install
uses: gbraad-dotfiles/app-action@main
with:
appname: vivaldi
action: installGitHub Action: dot-action
- name: Requiremnent for dot
run: |
sudo apt update
sudo apt install -y zsh
- name: Run dot command - devenv dotfedora exec cat /etc/os-release
uses: gbraad-dotfiles/dot-action@main
with:
run: |
devenv dotfedora exec cat /etc/os-releaseNote
This runs the specified commands without the need to 'install' the dotfiles.
It is required for the runner to have zsh installed.
Ansible role: gbraad.dotfiles and playbooks
- name: Install dotfiles
hosts: localhost
roles:
- role: gbraad.dotfiles
vars:
user: gbraadAnsible role: gbraad.dotfiles-devenv
- name: Run devenv command
hosts: localhost
roles:
- role: gbraad.dotfiles-devenv
vars:
prefix: gofedora
command: startAnsible role: gbraad.dotfiles-apps
- name: Run app installs
hosts: localhost
roles:
- role: gbraad.dotfiles-apps
vars:
appname: vivaldi
action: installAnsible role: gbraad.dotfiles-machine
- name: Run Go build vm
hosts: localhost
roles:
- role: gbraad.dotfiles-machine
vars:
prefix: gofedora
command: startExample/test: ⚙️
Runners kindly provided by Blacksmith and WarpBuild.
- Developer environment image
- Google Cloud Platform cloud shell
- Windows Subsystem for Linux (WSL2); Bash on Ubuntu on Windows (WSL1)
- Tested on: CentOS7+, Fedora 21+, and Ubuntu 14.04+
- GitPod
- Cygwin64
- Termux
- ...
| @gbraad |