Skip to content

Commit

Permalink
feat: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kiliantyler committed Sep 23, 2024
1 parent 700a2f6 commit 635ea0d
Show file tree
Hide file tree
Showing 19 changed files with 306 additions and 130 deletions.
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,22 @@
"**/.trunk/*tmp/": true,
"**/.trunk/*tools/": true,
},
"editor.foldingStrategy": "auto",
"[shellscript]": {
"editor.defaultFoldingRangeProvider": "zokugun.explicit-folding"
},
"explicitFolding.rules": {
"shellscript": [
{
"name": "Go Template folds",
"beginRegex": "^{{(-\\s)?\\/\\*$",
"endRegex": "^\\*\\/(\\s-)?}}$",
},
{
"name": "Folding Sections",
"beginRegex": "^(\\s+)?#.*\\[\\[\\[$",
"endRegex": "^(\\s+)?#\\s?\\]\\]\\]$",
}
]
}
}
2 changes: 1 addition & 1 deletion docs/src/content/docs/Tools/Ansible/OS/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: OS Role Overview
sidebar:
label: Overview
order: 4
order: 6
badge:
text: WIP
variant: caution
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/Tools/Ansible/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Ansible Overview
sidebar:
label: Overview
order: 3
order: 5
badge:
text: WIP
variant: caution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Chezmoi Overview
sidebar:
label: Overview
order: 3
order: 6
badge:
text: WIP
variant: caution
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/Tools/Chezmoi/repo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import StubComponent from '@react/StubComponent'
<StubComponent />


# File Structure
## File Structure
<FileTree>

- .devcontainer/
Expand Down
9 changes: 9 additions & 0 deletions docs/src/content/docs/Tools/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Tools Overview
sidebar:
label: Overview
order: 4
badge:
text: WIP
variant: caution
---
2 changes: 1 addition & 1 deletion docs/src/content/docs/ZSH/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ZSH Overview
sidebar:
label: Overview
order: 4
order: 5
badge:
text: WIP
variant: caution
Expand Down
6 changes: 5 additions & 1 deletion docs/src/content/docs/faq.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Frequently Asked Questions
sidebar:
order: 2
order: 3
---

:::caution[Work in Progress]
Expand All @@ -28,3 +28,7 @@ setting up your environment the way you like it.

They aren't. They're just mine. But I've spent a lot of time on them and I think they're pretty cool.
I've tried to make them as simple and easy to use as possible, while still being powerful and flexible.

## What tools do you use?

You can see a listing of all the tools I use in my [tools](/tools/overview) section.
41 changes: 41 additions & 0 deletions docs/src/content/docs/installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Installation
sidebar:
title: Installation
order: 2
---

### Installation Script

:::caution[Support]
Currently the script only supports:
- `Chezmoi` based dotfiles (Support for other dotfiles managers is coming soon)
- `Github` based dotfiles (Support for other git providers is coming soon)
- `main` or `master` branches (Support for other branches is coming soon)
- `MacOS` based systems (Support for other systems is coming soon)
:::

There is an `install.sh` script in the root of the [repository](/tools/Chezmoi/repo#File\ Structure) that will allow
the install of required tools and then run the dotfiles scripts via [Chezmoi](/tools/Chezmoi/overview).


:::tip
The script is hosted on a [Cloudflare](/external/cloudflare/overview) workers and you can pass in a username to the
curl command to install a specific user's dotfiles.
:::

```shell
curl install.dotfiles.wiki/kiliantyler | sh
```

### Ideals

The script is designed to be as simple as possible and to be as easy to use as possible. It is designed to be a
one-liner that can be run on any system to install the dotfiles.

There are many other "one-click" or "one-liner" dotfiles install scripts out there, but they generally are not truly
"one-liners" as they require some manual setup or configuration before the "one-line" can be run. This script is
designed to be a true one-liner. Installing all the required tools and then running the dotfiles install.

If you have to install any tools or configure anything before running a "one-liner" then it is not a true "one-liner",
in my opinion.
77 changes: 67 additions & 10 deletions dotfiles/.chezmoisymlinks/mise/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,92 @@ trusted_config_paths = [
"{{ get_env(name='HOME') }}/Github/shamubernetes/",
"{{ get_env(name='HOME') }}/Github/kiliantyler/",
]
disable_hints = ["python_multi"]

[plugins]
devcontainer = "https://github.com/iloveitaly/asdf-devcontainer"
trunk = "https://github.com/sdurrheimer/asdf-trunk"
micro = "https://github.com/YR-ZR0/asdf-micro"
topgrade = "https://github.com/kiliantyler/asdf-topgrade.git"
aliae = "https://github.com/kiliantyler/asdf-aliae.git"
coreutils = "https://github.com/kiliantyler/asdf-coreutils.git"

[tools]
1password-cli = "latest"
age = "latest"
age = "latest" # TODO: List-all broken
aliae = "latest"
aws-sso-cli = "latest"
awscli = "latest"
bun = "latest"
coreutils = "latest"
cue = "0.10.0" # TODO: latest is broken
# devcontainer = "latest" # TODO: List-all broken
direnv = "latest"
dust = "latest"
editorconfig-checker = "latest"
eza = "latest"
flux2 = "latest"
fzf = "latest"
golang = "latest"
golangci-lint = "latest"
goreleaser = "latest"
goss = "latest"
helm = "latest"
jq = "latest"
kubecolor = "latest"
kubectl = "latest"
make = "latest"
micro = "latest"
node = "latest"
python = "latest"
terragrunt = "latest"
zoxide = "latest"
flux2 = "latest"
sops = "latest"
task = "latest"
yq = "latest"
talosctl = "latest"
terraform-docs = "latest"
terraform = "latest"
terragrunt = "latest"
# topgrade = "latest" # TODO: List-all broken
trunk = "latest"
yamlfmt = "latest"
usage = "latest"
yarn = "latest"
yq = "latest"
zoxide = "latest"

# To Create
# asdf-aliae
# git-lfs
# gnu-indent
# gnu-sed
# gnu-tar
# gnu-which
# gnupg
# grep
# most
# unzip
# watchman
# wget

# TODO: asdf-m4 -> asdf-autoconf
# autoconf needed for git
git = "latest"

# Go tools
go = "latest"
"go:github.com/cloudflare/cf-terraforming/cmd/cf-terraforming" = "latest"

# Rust tools
rust = "latest"
"cargo:eza" = "latest"
"cargo:bat" = "latest"
kubecolor = "latest"
yarn = "1.22.22"
"cargo:procs" = "latest"
"cargo:findutils" = "latest" # Replace with gnu find
"cargo:diffutils" = "latest" # Replace with gnu diff
"cargo:coreutils" = "latest"

# Python tools
python = "latest"
pipx = "latest"
"pipx:ansible-core" = "latest"
"pipx:ansible" = "latest"
"pipx:jinja2-cli" = "latest"
"pipx:virtualenv" = "latest"
colima = "latest"
lima = "latest"
11 changes: 6 additions & 5 deletions dotfiles/.chezmoisymlinks/vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"dot_zlogout.tmpl": "../../icons/zsh",
"dot_zplugins.tmpl": "../../icons/zsh",
"dot_zstyles.tmpl": "../../icons/zsh",
"dot_zkeybinds.tmpl": "../../icons/zsh",
"dot_zkeybinds.tmpl": "../../icons/zsh"
},
"typescript.updateImportsOnFileMove.enabled": "always",
"update.mode": "manual",
Expand Down Expand Up @@ -182,7 +182,7 @@
".breadcrumbs-control": "height: 18px",
".monaco-breadcrumbs": "font-size: 11px; transform: translateY(0px);",
// This allows the sidebar icons to be larger
".sidebar .monaco-icon-label:before": "background-size: 28px; height: 25px; width: 30px; padding: 4px;",
".sidebar .monaco-icon-label:before": "background-size: 28px; height: 25px; width: 30px; padding: 4px;"
},
"window.titleBarStyle": "native",
"window.customTitleBarVisibility": "never",
Expand Down Expand Up @@ -238,10 +238,11 @@
"zsh": {
"path": "zsh",
"args": ["-l"]
},
}
},
"yaml.schemas": {
"file:///home/ktyler/.vscode/extensions/atlassian.atlascode-3.0.10/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
"file:///Users/kilian/.vscode/extensions/atlassian.atlascode-3.0.10/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml",
"file:///Home/ktyler/.vscode/extensions/atlassian.atlascode-3.0.10/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
},
"atlascode.jira.enabled": false,
"github.copilot.enable": {
Expand All @@ -254,5 +255,5 @@
"diffEditor.ignoreTrimWhitespace": true
},
"terminal.external.linuxExec": "kitty",
"terminal.explorerKind": "both",
"terminal.explorerKind": "both"
}
80 changes: 42 additions & 38 deletions dotfiles/dot_zshenv.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,45 @@ $$\ $$$$$$$$\ $$$$$$$ |$$ | $$ |\$$$$$$$\ $$ | $$ | \$ /
## Location: ~/.zshenv
*/}}

# -----------------------------------------------------------
# XDG Base Directory Specification
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
# https://wiki.archlinux.org/title/XDG_Base_Directory
# -----------------------------------------------------------
export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
export XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
export XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}

export XDG_DATA_DIRS=$(tr ':' '\n' <<< "${XDG_DATA_HOME}:/usr/local/share/:/usr/share/" | awk NF | tr '\n' ':')
export XDG_CONFIG_DIRS=$(tr ':' '\n' <<< "${XDG_CONFIG_HOME}:/etc/xdg" | awk NF | tr '\n' ':')

export XDG_DESKTOP_DIR=${XDG_DESKTOP_DIR:-$HOME/Desktop}
export XDG_DOCUMENTS_DIR=${XDG_DOCUMENTS_DIR:-$HOME/Documents}
export XDG_DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
export XDG_MUSIC_DIR=${XDG_MUSIC_DIR:-$HOME/Music}
export XDG_PICTURES_DIR=${XDG_PICTURES_DIR:-$HOME/Pictures}
export XDG_PUBLICSHARE_DIR=${XDG_PUBLICSHARE_DIR:-$HOME/Public}
export XDG_TEMPLATES_DIR=${XDG_TEMPLATES_DIR:-$HOME/Templates}
export XDG_VIDEOS_DIR=${XDG_VIDEOS_DIR:-$HOME/Videos}

# -----------------------------------------------------------
# ZSH Configuration
# https://zsh.sourceforge.io/Doc/Release/Files.html
# -----------------------------------------------------------

# Rehome ZDOTDIR to $XDG_CONFIG_HOME/zsh
export ZDOTDIR=$XDG_CONFIG_HOME/zsh

export ZPFX=${ZPFX:-$HOME/.zpfx}

# Needed for VSCode to see shims
[[ -n "$VSCODE_PID" ]] && eval "$({{ .chezmoi.homeDir }}/.local/bin/mise activate zsh --shims)"

if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR}/.zprofile" ]]; then
source "${ZDOTDIR:-$HOME}/.zprofile"
fi
# 1. Load environment variables [[[

# 1.1 XDG Base Directory Specification [[[
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
# https://wiki.archlinux.org/title/XDG_Base_Directory
# -----------------------------------------------------------
export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
export XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
export XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}

export XDG_DATA_DIRS=$(tr ':' '\n' <<< "${XDG_DATA_HOME}:/usr/local/share/:/usr/share/" | awk NF | tr '\n' ':')
export XDG_CONFIG_DIRS=$(tr ':' '\n' <<< "${XDG_CONFIG_HOME}:/etc/xdg" | awk NF | tr '\n' ':')

export XDG_DESKTOP_DIR=${XDG_DESKTOP_DIR:-$HOME/Desktop}
export XDG_DOCUMENTS_DIR=${XDG_DOCUMENTS_DIR:-$HOME/Documents}
export XDG_DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
export XDG_MUSIC_DIR=${XDG_MUSIC_DIR:-$HOME/Music}
export XDG_PICTURES_DIR=${XDG_PICTURES_DIR:-$HOME/Pictures}
export XDG_PUBLICSHARE_DIR=${XDG_PUBLICSHARE_DIR:-$HOME/Public}
export XDG_TEMPLATES_DIR=${XDG_TEMPLATES_DIR:-$HOME/Templates}
export XDG_VIDEOS_DIR=${XDG_VIDEOS_DIR:-$HOME/Videos}
# ]]]

# 1.2 ZSH Configuration [[[
# https://zsh.sourceforge.io/Doc/Release/Files.html
# -----------------------------------------------------------

# Rehome ZDOTDIR to $XDG_CONFIG_HOME/zsh
export ZDOTDIR=$XDG_CONFIG_HOME/zsh

# Needed for VSCode to see shims
[[ -n "$VSCODE_PID" ]] && \
eval "$({{ .chezmoi.homeDir }}/.local/bin/mise activate zsh --shims)"

# Load zshenv for Interactive Shells
[[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) ]] && \
[[ -s "${ZDOTDIR}/.zprofile" ]] && \
source "${ZDOTDIR:-$HOME}/.zprofile"
# ]]]

# ]]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env zsh


eval "$(~/.local/bin/mise activate zsh)"
17 changes: 16 additions & 1 deletion dotfiles/private_dot_config/zsh/dot_zkeybinds.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,20 @@ $$\ $$$$$$$$\ $$ | \$$\ \$$$$$$$\ \$$$$$$$ |$$$$$$$ |$$ |$$ | $$ |\$$$$$$$ |$$
\$$$$$$ |
\______/
TODO: Add description

Reference: https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#Keyboard-Definition
*/}}

"^A" beginning-of-line
"^E" end-of-line
"^H" backward-delete-char
"^K" kill-line
"^L" clear-screen
"^R" history-incremental-search-backward
"^S" history-incremental-search-forward
"^U" kill-whole-line
"^V" quoted-insert
"^[b" backward-word
"^[f" forward-word
"^[q" push-line
"^[x" execute-named-cmd
"^?" backward-delete-char
Loading

0 comments on commit 635ea0d

Please sign in to comment.