Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: mise #1

Merged
merged 4 commits into from
Sep 14, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run actionlint
shell: bash
run: |
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: no-commit-to-branch
args: ["--branch", "main"]

- repo: local
hooks:
- id: secretlint
name: secretlint
language: docker_image
entry: secretlint/secretlint:latest secretlint
19 changes: 0 additions & 19 deletions config/homebrew/Brewfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,28 @@
tap "hashicorp/tap"
tap "homebrew/bundle"
tap "rcmdnk/file"
tap "homebrew/cask-fonts"
brew "act"
brew "bat"
brew "bottom"
brew "glib"
brew "cairo"
brew "coreutils"
brew "dust"
brew "eza"
brew "fd"
brew "gcc"
brew "gdrive"
brew "genact"
brew "gh"
brew "git"
brew "git-delta"
brew "hadolint"
brew "hdf5"
brew "helix"
brew "libdap"
brew "libpq"
brew "little-cms2"
brew "netcdf"
brew "node"
brew "openblas"
brew "webp"
brew "qt@5"
brew "poppler-qt5"
brew "virtualenv"
brew "ripgrep"
brew "sheldon"
brew "shellcheck"
brew "starship"
brew "tealdeer"
brew "tfsec"
brew "tree"
brew "hashicorp/tap/packer"
brew "rcmdnk/file/brew-file"
cask "1password"
cask "1password-cli"
cask "codewhisperer"
cask "docker"
cask "font-hack-nerd-font"
cask "google-cloud-sdk"
Expand Down
30 changes: 30 additions & 0 deletions config/mise/mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[tools]
# languages
python = ["3.11", "3.12"]
rust = "1.81.0"
terraform = "1.9.5"
go = "1.23.1"

# tools
uv = "0.4.9"
act = "latest"
actionlint = "latest"
hadolint = "latest"
1password-cli = "latest"
pre-commit = "latest"
bat = "latest"
bottom = "latest"
eza = "latest"
ripgrep = "latest"
dust = "latest"
github-cli = "latest"
delta = "latest"
starship = "latest"
tflint = "latest"
tfsec = "latest"
packer = "latest"
gcloud = "latest"
just = "latest"

# runtime
node = "22.8.0"
12 changes: 4 additions & 8 deletions config/zsh/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ unsetopt GLOBAL_RCS

export PATH="$HOME/.local/bin:$PATH"

### tfenv ###
export PATH="$HOME/.tfenv/bin:$PATH"
# docker
export PATH="$HOME/.docker/bin/docker:$PATH"

### pyenv ###
export PATH="$HOME/.pyenv/bin:$PATH"

### golang ###
export PATH="/usr/local/go/bin:$PATH"
export GOPATH="$HOME/go"
# mise
export PATH="$HOME/.local/share/mise/shims:$PATH"

### cuda ###
export PATH="/usr/local/cuda/bin:$PATH"
Expand Down
7 changes: 0 additions & 7 deletions config/zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@ eval "$(starship init zsh)"
# sheldon
eval "$(sheldon source)"

# pyenv
eval "$(pyenv init -)"

# rye
source "$HOME/.rye/env"

setopt AUTO_CD
setopt AUTO_PARAM_KEYS
setopt nonomatch

alias cat='bat'
alias ls='eza --icons --long --time-style=long-iso --header'
alias find='fd'
alias grep='rg'
alias top='btm'
alias act='act --container-architecture linux/amd64'
Expand Down
53 changes: 0 additions & 53 deletions install/common/golang.sh

This file was deleted.

19 changes: 19 additions & 0 deletions install/common/mise.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -Eeuxo pipefail

function install_mise() {
curl https://mise.run | sh
}

function uninstall_mise() {
rm ~/.local/bin/mise
}

function main() {
install_mise
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main
fi
21 changes: 0 additions & 21 deletions install/common/poetry.sh

This file was deleted.

31 changes: 0 additions & 31 deletions install/common/pyenv.sh

This file was deleted.

21 changes: 0 additions & 21 deletions install/common/rye.sh

This file was deleted.

33 changes: 0 additions & 33 deletions install/common/tfenv.sh

This file was deleted.

8 changes: 8 additions & 0 deletions install/link.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,11 @@ ln -sf "${REPO_DIR}/config/vscode/settings.json" "${VSCODE_SETTING_DIR}/settings
### zsh ###
ln -sf "$REPO_DIR"/config/zsh/.zshrc ~/.zshrc
ln -sf "$REPO_DIR"/config/zsh/.zshenv ~/.zshenv


### mise ###
readonly MISE_CONFIG_DIR="$HOME/.config/mise"
if [ ! -d "$MISE_CONFIG_DIR" ]; then
mkdir -p "$MISE_CONFIG_DIR"
fi
ln -sf "$REPO_DIR"/config/mise/mise.toml ~/.config/mise/config.toml
3 changes: 3 additions & 0 deletions install/mac/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ for SCRIPT in "${COMMON_DIR}"/*.sh; do
echo "No shell scripts found in ${COMMON_DIR}."
fi
done

### install mise dependencies ###
mise install -y
Loading
Loading