Skip to content

Commit

Permalink
Move to Toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
smores56 committed Oct 18, 2024
1 parent 4781e54 commit d8566aa
Show file tree
Hide file tree
Showing 66 changed files with 934 additions and 1,751 deletions.
2 changes: 1 addition & 1 deletion .chezmoiignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
README.md
bootstrap
Dockerfile
29 changes: 29 additions & 0 deletions .github/workflows/publish-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and publish a Docker image

on:
push:
paths:
- Dockerfile

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: smores56/smores-arch-toolbox:latest
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM docker.io/imrehg/archlinux-makepkg:latest

LABEL com.github.containers.toolbox="true" \
name="smores-arch-toolbox" \
version="latest" \
usage="This image is meant to be used with the toolbox(1) command" \
summary="Image for creating Arch Toolbx containers"

# Install Arch packages
RUN yay -S --noconfirm --needed \
python3 python-pip go rust terraform fnm-bin $(: Languages) \
gcc moreutils cmake base-devel $(: Build tools) \
zoxide eza ripgrep sd fzf $(: Navigation) \
zellij yazi glow helix $(: Explore) \
openssh openssl curl bandwhich $(: Networking) \
bat fd dua-cli ouch file trash-cli $(: Files) \
k9s docker docker-compose oxker $(: Containers) \
fish pfetch-rs-bin $(: Shell) \
zip unzip ouch jq $(: Processing) \
gnupg pinentry xsel wl-clipboard gum $(: Shell I/O) \
git git-lfs github-cli git-delta difftastic lazygit gitui $(: Git) \
bottom eva taplo-cli tokei cbonsai typeracer-bin aws-cli-v2 $(: Misc) \
# Editor tools
nixpkgs-fmt nil-git mypy python-lsp-server $(: LSP) \
rust-analyzer gopls typst-lsp typstyle marksman $(: LSP) \
# GUI
ttf-cascadia-code-nerd ttf-nerd-fonts-symbols $(: Fonts) \
discord firefox vlc evince thunar alacritty feh $(: Apps) \
kicad gimp libreoffice-still $(: Apps)

# Install JS packages
RUN fnm install --lts && \
fnm exec --using=lts-latest npm install --global \
yarn \
yaml-language-server \
bash-language-server \
svelte-language-server \
@prisma/language-server \
typescript-language-server \
vscode-langservers-extracted \
graphql-language-service-cli \
dockerfile-language-server-nodejs
55 changes: 38 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Dotfiles
========

This folder contains scripts to set up my [Qtile][qtile] environment on [Void Linux][void linux].
This repo contains config for my Linux environment.

I use [Alacritty][alacritty] as my terminal emulator, [Fish][fish] for my shell,
[Helix][helix] for my editor, and [Zellij][zellij] for multitasking, so most of
Expand All @@ -10,36 +10,57 @@ to want already installed everywhere.

## Install

I use [chezmoi][chezmoi] to manage my dotfiles, and I have a [bootstrap](./bootstrap)
script that runs a full setup on new machines. After making sure you have `sh`, `git`,
and `curl` installed, just run:
I use [chezmoi][chezmoi] to manage my dotfiles, and I install my tools from a container
using [toolbx][toolbx]. You should first ensure you have the following already installed:

```
curl -sSfL bootstrap.sammohr.dev | sh
- git
- curl
- [toolbox](https://containertoolbx.org/install)

Then run the following:

```sh
# Install dotfiles
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply smores56
# Install the toolbox container
toolbox create --image smores56/smores-arch-toolbox:latest
# Make toolbox simple to invoke
echo 'alias enter "SHELL=/bin/sbin/fish toolbox enter smores-arch-toolbox"' >> ~/.bashrc
```

## Post-Install

If you want file syncronization with [pCloud][pcloud], you should install the app [from their site][install pcloud].
You'll probably want to set up your SSH key and GitHub access like this:

You can set an autologin username for the [emptty][emptty] login manager
in the system-wide config as shown in its [README][emptty conf]. This only works if
you add `$USER` to the group `nopasswdlogin`:
```sh
# Create SSH key
if ! test -e ~/.ssh/id_ed25519.pub; then
mkdir -p ~/.ssh
ssh-keygen -t ed25519 -b 4096 -C $(hostname)
fi

# Log in to GitHub via CLI
gh auth login --git-protocol=ssh --scopes=admin:public_key

# Add SSH key to GitHub
PUBLIC_KEY=$(cat ~/.ssh/id_ed25519.pub | cut -d " " -f 2)
if ! curl -L https://github.com/smores56.keys | grep "$PUBLIC_KEY" 1>/dev/null; then
gh ssh-key add ~/.ssh/id_ed25519.pub -t "$(hostname)"
fi

# Use SSH auth for dotfiles repo
cd $(chezmoi source-path)
git remote set-url origin git@github.com:smores56/dotfiles.git
```
sudo groupadd nopasswdlogin
sudo usermod -a -G nopasswdlogin $USER
```

If you want file syncronization with [pCloud][pcloud], you should install the app [from their site][install pcloud].


[void linux]: https://voidlinux.org/
[qtile]: http://www.qtile.org/
[toolbx]: https://containertoolbx.org/
[chezmoi]: https://www.chezmoi.io/
[alacritty]: https://github.com/alacritty/alacritty
[fish]: https://fishshell.com
[helix]: https://helix-editor.com
[zellij]: https://zellij.dev
[emptty]: https://github.com/tvrzna/emptty
[emptty conf]: https://github.com/tvrzna/emptty#etcempttyconf
[pcloud]: https://www.pcloud.com
[install pcloud]: https://www.pcloud.com/download-free-online-cloud-file-storage.html
30 changes: 0 additions & 30 deletions bootstrap

This file was deleted.

13 changes: 13 additions & 0 deletions dot_config/alacritty/alacritty.toml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import = ["~/.config/alacritty/theme.toml"]

[shell]
program = "/bin/sbin/fish"
args = ["-c", "toolbox enter smores-arch-toolbox"]

[window]
decorations = "None"
blue = true

[font]
size = {{ .terminalFontSize }}
normal = { family = {{ .terminalFont | quote }} }
7 changes: 0 additions & 7 deletions dot_config/alacritty/alacritty.yml.tmpl

This file was deleted.

23 changes: 23 additions & 0 deletions dot_config/alacritty/dark/ayu_dark.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[colors.bright]
black = "#686868"
blue = "#59C2FF"
cyan = "#95E6CB"
green = "#C2D94C"
magenta = "#FFEE99"
red = "#F07178"
white = "#FFFFFF"
yellow = "#FFB454"

[colors.normal]
black = "#01060E"
blue = "#53BDFA"
cyan = "#90E1C6"
green = "#91B362"
magenta = "#FAE994"
red = "#EA6C73"
white = "#C7C7C7"
yellow = "#F9AF4F"

[colors.primary]
background = "#0A0E14"
foreground = "#B3B1AD"
28 changes: 0 additions & 28 deletions dot_config/alacritty/dark/ayu_dark.yml

This file was deleted.

24 changes: 24 additions & 0 deletions dot_config/alacritty/dark/ayu_mirage.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[colors.bright]
black = "#686868"
blue = "#65bddb"
cyan = "#9debcf"
green = "#58c49c"
magenta = "#f17676"
red = "#f58c7d"
white = "#ffffff"
yellow = "#ffd165"

[colors.normal]
black = "#212733"
blue = "#60b8d6"
cyan = "#98e6ca"
green = "#53bf97"
magenta = "#ec7171"
red = "#f08778"
white = "#fafafa"
yellow = "#fdcc60"

[colors.primary]
background = "#1f2430"
bright_foreground = "#f28779"
foreground = "#cbccc6"
28 changes: 0 additions & 28 deletions dot_config/alacritty/dark/ayu_mirage.yml

This file was deleted.

75 changes: 75 additions & 0 deletions dot_config/alacritty/dark/catppuccin_macchiato.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[[colors.indexed_colors]]
color = "#F5A97F"
index = 16

[[colors.indexed_colors]]
color = "#F4DBD6"
index = 17

[colors.bright]
black = "#5B6078"
blue = "#8AADF4"
cyan = "#8BD5CA"
green = "#A6DA95"
magenta = "#F5BDE6"
red = "#ED8796"
white = "#A5ADCB"
yellow = "#EED49F"

[colors.cursor]
cursor = "#F4DBD6"
text = "#24273A"

[colors.dim]
black = "#494D64"
blue = "#8AADF4"
cyan = "#8BD5CA"
green = "#A6DA95"
magenta = "#F5BDE6"
red = "#ED8796"
white = "#B8C0E0"
yellow = "#EED49F"

[colors.hints.end]
background = "#A5ADCB"
foreground = "#24273A"

[colors.hints.start]
background = "#EED49F"
foreground = "#24273A"

[colors.normal]
black = "#494D64"
blue = "#8AADF4"
cyan = "#8BD5CA"
green = "#A6DA95"
magenta = "#F5BDE6"
red = "#ED8796"
white = "#B8C0E0"
yellow = "#EED49F"

[colors.primary]
background = "#24273A"
bright_foreground = "#CAD3F5"
dim_foreground = "#CAD3F5"
foreground = "#CAD3F5"

[colors.search.focused_match]
background = "#A6DA95"
foreground = "#24273A"

[colors.search.footer_bar]
background = "#A5ADCB"
foreground = "#24273A"

[colors.search.matches]
background = "#A5ADCB"
foreground = "#24273A"

[colors.selection]
background = "#F4DBD6"
text = "#24273A"

[colors.vi_mode_cursor]
cursor = "#B7BDF8"
text = "#24273A"
Loading

0 comments on commit d8566aa

Please sign in to comment.