Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
153 changes: 153 additions & 0 deletions .github/workflows/tui-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# DotFiles TUI — CI/CD Pipeline
#
# Triggers:
# - Push / PR to main: build + test
# - Tag v*: build + test + AppImage + GitHub Release
# - workflow_dispatch: same as push (no release unless the ref is a v* tag)
#
# AppImage ships the TUI binary + docs only (no modules tree).

name: DotFiles TUI CI/CD

on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build & Test
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Download dependencies
run: go mod download

- name: Build
run: make -C tui build

- name: Run tests
run: make -C tui test

- name: Vet
run: go vet ./...

release:
name: Release AppImage
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Download dependencies
run: go mod download

- name: Extract version
id: version
run: echo "VERSION=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"

# FUSE is unavailable on GitHub-hosted runners; extract appimagetool and
# invoke AppRun directly. See: https://github.com/AppImage/AppImageKit/wiki/FUSE
- name: Install appimagetool
run: |
cd /tmp
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage \
-O appimagetool.AppImage
chmod +x appimagetool.AppImage
./appimagetool.AppImage --appimage-extract
sudo rm -rf /opt/appimagetool
sudo mv squashfs-root /opt/appimagetool
sudo ln -sf /opt/appimagetool/AppRun /usr/local/bin/appimagetool
appimagetool --version || true

- name: Build AppImage
env:
CGO_ENABLED: "0"
GOOS: linux
GOARCH: amd64
APPIMAGE_EXTRACT_AND_RUN: "1"
run: make -C tui appimage VERSION=${{ steps.version.outputs.VERSION }}

- name: Verify AppImage artifact
working-directory: tui/build
env:
APPIMAGE_EXTRACT_AND_RUN: "1"
run: |
set -euo pipefail
APPIMAGE="dotfiles-tui-${{ steps.version.outputs.VERSION }}-x86_64.AppImage"
test -f "$APPIMAGE"
chmod +x "$APPIMAGE"
# Extract and confirm zero modules shipped + binary + docs present
./"$APPIMAGE" --appimage-extract
test -x squashfs-root/usr/bin/dotfiles-tui
test -f squashfs-root/usr/share/doc/dotfiles-tui/ADDING_MODULES.md
test -f squashfs-root/usr/share/doc/dotfiles-tui/TROUBLESHOOTING.md
if [ -d squashfs-root/modules ] || [ -d squashfs-root/usr/share/modules ]; then
echo "error: AppImage must not contain modules" >&2
exit 1
fi
./squashfs-root/usr/bin/dotfiles-tui --version
rm -rf squashfs-root

- name: Create tarball
working-directory: tui
run: |
tar -czf build/dotfiles-tui-${{ steps.version.outputs.VERSION }}-linux-amd64.tar.gz \
-C build dotfiles-tui

- name: Generate checksums
working-directory: tui/build
run: |
sha256sum \
"dotfiles-tui-${{ steps.version.outputs.VERSION }}-x86_64.AppImage" \
"dotfiles-tui-${{ steps.version.outputs.VERSION }}-linux-amd64.tar.gz" \
> "checksums-${{ steps.version.outputs.VERSION }}.sha256"

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: DotFiles TUI ${{ steps.version.outputs.VERSION }}
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
generate_release_notes: true
body: |
## Install

1. Download `dotfiles-tui-*-x86_64.AppImage`
2. `chmod +x` and run it
3. Install git / stow / curl if prompted
4. Point the TUI at your **modules** directory (AppImage ships none)

See [INSTALL.md](https://github.com/${{ github.repository }}/blob/main/tui/docs/INSTALL.md).
files: |
tui/build/dotfiles-tui-${{ steps.version.outputs.VERSION }}-x86_64.AppImage
tui/build/dotfiles-tui-${{ steps.version.outputs.VERSION }}-linux-amd64.tar.gz
tui/build/checksums-${{ steps.version.outputs.VERSION }}.sha256
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "wezterm-config"]
path = wezterm/.config/wezterm
path = modules/wezterm/.config/wezterm
url = https://github.com/Issafalcon/wezterm-config
[submodule "nvim-config"]
path = nvim/.config/nvim
path = modules/nvim/.config/nvim
url = https://github.com/Issafalcon/nvim-config
[submodule "anthropic-skills"]
path = ai/anthropic-skills
path = modules/ai/anthropic-skills
url = https://github.com/anthropics/skills.git
7 changes: 6 additions & 1 deletion .stow-local-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ _darcs
^/LICENSE.*
^/COPYING

# Files taht should remain local
# Files that should remain local
install.sh
uninstall.sh
module.go
module.yaml
path.zsh
completion.zsh
docs/
tui/
modules/
119 changes: 20 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,116 +1,37 @@
# Issafalcon dotfiles

> Modular installation of terminal, and terminal tools with my personal config files
> Inspired by [`caarlos0 dotFiles setup`](https://github.com/caarlos0/dotfiles)
> Modular terminal tools and configs, managed by a Go TUI (AppImage-friendly).
>
> DISCLOSURE: Most of the contents have only been tested using Ubuntu 22.04 on native Linux machine and WSL
> They are also an ongoing WIP and highly personalised, so please review the module code before you install to make sure it fits your needs
> DISCLOSURE: Tested mainly on Ubuntu 22.04 (native / WSL). Review module scripts before installing.

The goals of my dotFiles are as follows:
1. Replace default shell with zsh, adding useful plugins without compromising speed
2. Create modular installation options for remaining dotfiles
3. Allow customization and extensibility
## Quick start (AppImage)

## Installation
1. Download the AppImage, `chmod +x`, run it.
2. Satisfy prereqs (git, stow, curl) if prompted.
3. Point the app at a **modules** directory you own (empty is fine).
4. Add modules as folders with `module.yaml` (+ scripts/configs). See docs in-app (`H`) or [internal/docs/ADDING_MODULES.md](internal/docs/ADDING_MODULES.md).

### Setup and prerequisites intallation
The AppImage does **not** bundle modules — only the TUI and documentation.

The following will install some prerequisite files onto your machine (requires `sudo`)
e.g. git, curl, wget etc.
Releases are published from version tags (`v*`) via GitHub Actions — see [INSTALL.md](tui/docs/INSTALL.md).

It will quickly replace the default shell with zsh and add plugins using zinit.
## Layout

The default theme is powerline10k (you can change this)

These prerequisites may change as I evolve this repo.

> IMPORTANT: Clone to the ~/dotFiles directory as this will become the default stow directory (this can of course be modified)

```console
$ git clone https://github.com/Issafalcon/dotFiles.git ~/dotFiles
$ cd ~/dotFiles
$ ./prerequisites.sh
$ zsh
```

Zinit plugins will be installed and you will need to restart your terminal to be taken to
powerline10k configuration wizard.

It is recommended that you install a NerdFont compatible font prior to setting up powerline10k.

### Module Installation

Following the `prerequisites.sh` script run, modules can be installed via two scripts in the root directory:
- `./bootstrap.sh`
- `./bootstrap_bulk.sh`

Module names match the names of the top level subdirectories in the repo (except `docs` and `.git`)

The recommended order of modules would be:
1. `fzf` - The `z` function (fzf search on previously visited directories) relies on this being installed
2. `homebrew` - Required for installation of some of the other modules
3. `libsecret` - Used for storing git credentials in WSL
4. `git` - Adds `delta` which provides prettier output for git commands
5. `tmux` - Terminal multiplexer
6. `ranger` - Terminal file explorer
7. `lazygit` - TUI for git

#### Individual Modules

To "install" a module run the following:

```console
$ ./bootstrap.sh -m <MODULE_NAME> -i
go.mod / internal/ # TUI core
tui/ # main, Makefile, AppImage assets
modules/<name>/ # your packages: module.yaml, install.sh, stow files
```
> Or, if you don't want to install the actual dependencies for the module (you may have them installed already)

```console
$ ./bootstrap.sh -m <MODULE_NAME>
```
#### Bulk Install Modules

To install multiple modules at once (or all of them), run the following:
## From source

```console
$ ./bootstrap_bulk.sh -i [...MODULE_NAMES] # Where <MODULE_NAMES> is a space separated list of modules
git clone <repo> ~/dotFiles
cd ~/dotFiles/tui && make run
```
> Or, if you don't want to install the actual dependencies for the module (you may have them installed already)

```console
$ ./bootstrap.sh -m [...MODULE_NAMES]
```

### Neovim Setup

### MySql Setup

This module folder contains a `docker-compose.yaml` file and associated `.env` and SQL script files to startup a containerized MySql server.

## Further help:

- [Opinionated Terminal Setup for WSL2 on Windows](/docs/WSL2.md)
- [Personalize your configs](/docs/PERSONALIZATION.md)
- [Understand how it works](/docs/DESIGN.md)

## Contributing

At the moment, I am not accepting PRs, but please feel free to open issues or add suggestions for improvements,
so that setup can be made more accessible.

## Feature Roadmap 🌌:
- [x] Replace all occurences of ~/repos with $PROJECTS variable
- [x] Replace Homebrew installations with apt package manager (and remove Homebrew from deps) (NOTE: Lazygit and some language servers / formatters still require homebrew)
- [ ] Add uninstall scripts for modules
- [ ] zsh
- [ ] node
- [ ] python
- [ ] etc...
- [ ] Add ability to load custom .zsh settings
- [ ] Add detailed design guide to how it works
- [x] Tidy up prerequisites to make as minimal as possible
- [ ] Add silent install for modules
- [ ] zsh
- [ ] node
- [ ] python
- [ ] etc...
## Further help

- [Install / AppImage](tui/docs/INSTALL.md)
- [Adding modules](internal/docs/ADDING_MODULES.md)
- [Troubleshooting](internal/docs/TROUBLESHOOTING.md)
Loading
Loading