drop wsl and devterm (closes #1)
This commit is contained in:
parent
fc831dbc7f
commit
6040cac5f8
7 changed files with 9 additions and 164 deletions
84
README.md
84
README.md
|
@ -1,54 +1,22 @@
|
||||||
# dotfiles
|
# dotfiles
|
||||||
|
|
||||||
## hostnames
|
## 1. set the fqdn:
|
||||||
|
|
||||||
- `rattusrattus`: macbook
|
|
||||||
- `yersiniapestis`: wsl (debian)
|
|
||||||
- `devterm`: devterm (debian)
|
|
||||||
|
|
||||||
## steps
|
|
||||||
|
|
||||||
(1) set the fqdn (this is necessary for some of the host-specific chezmoi config):
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# debian standalone
|
# macos-specific commands
|
||||||
sudo hostnamectl set-hostname $MY_HOSTNAME.local
|
|
||||||
|
|
||||||
# debian wsl
|
|
||||||
echo -e "[network]\nhostname = $MY_HOSTNAME" | sudo tee -a /etc/wsl.conf
|
|
||||||
|
|
||||||
# macos
|
|
||||||
sudo scutil --set HostName $MY_HOSTNAME.local
|
sudo scutil --set HostName $MY_HOSTNAME.local
|
||||||
sudo scutil --set LocalHostName $MY_HOSTNAME
|
sudo scutil --set LocalHostName $MY_HOSTNAME
|
||||||
sudo scutil --set ComputerName $MY_HOSTNAME
|
sudo scutil --set ComputerName $MY_HOSTNAME
|
||||||
dscacheutil -flushcache
|
dscacheutil -flushcache
|
||||||
```
|
```
|
||||||
|
|
||||||
(2) reboot
|
## 2. reboot
|
||||||
|
|
||||||
(3) set up the package manager and bootstrap dependencies:
|
## 3. install https://typeof.net/Iosevka/
|
||||||
|
|
||||||
```bash
|
## 4. install `age` private key from password manager into `~/.key.txt`
|
||||||
# debian
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install curl zsh git
|
|
||||||
```
|
|
||||||
|
|
||||||
(4) set the initial shell:
|
## 5. bootstrap chezmoi:
|
||||||
|
|
||||||
```bash
|
|
||||||
# debian
|
|
||||||
chsh -s $(which zsh)
|
|
||||||
|
|
||||||
# macos
|
|
||||||
# NA
|
|
||||||
```
|
|
||||||
|
|
||||||
(5) https://typeof.net/Iosevka/
|
|
||||||
|
|
||||||
(6) install `age` private key from password manager into `~/.key.txt`
|
|
||||||
|
|
||||||
(7) bootstrap chezmoi:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sh -c "$(curl -fsLS get.chezmoi.io)" -- \
|
sh -c "$(curl -fsLS get.chezmoi.io)" -- \
|
||||||
|
@ -58,42 +26,4 @@ sh -c "$(curl -fsLS get.chezmoi.io)" -- \
|
||||||
--guess-repo-url=false
|
--guess-repo-url=false
|
||||||
```
|
```
|
||||||
|
|
||||||
(8) set the new shell (in case installing from 3rd-party package manager):
|
## 6. restart shell
|
||||||
|
|
||||||
```bash
|
|
||||||
# debian
|
|
||||||
# NA
|
|
||||||
|
|
||||||
# macos
|
|
||||||
sudo chpass -s '/opt/local/bin/zsh' $USER
|
|
||||||
```
|
|
||||||
|
|
||||||
(9) restart shell
|
|
||||||
|
|
||||||
(10) grab project source
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ssh -T git@github.com
|
|
||||||
gwar ~/.local/share/chezmoi/data/personal.toml
|
|
||||||
```
|
|
||||||
|
|
||||||
(11) install miniconda:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# debian
|
|
||||||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
|
|
||||||
|
|
||||||
# macos
|
|
||||||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -O miniconda.sh
|
|
||||||
|
|
||||||
# then, for either os:
|
|
||||||
chmod +x miniconda.sh
|
|
||||||
sudo ./miniconda.sh -b -u -p /opt/miniconda3
|
|
||||||
```
|
|
||||||
|
|
||||||
(12) set up non-automated software and tools:
|
|
||||||
|
|
||||||
- steermouse (license in email): btn4==fwd, btn5==bck
|
|
||||||
- logitech control center
|
|
||||||
- lunar
|
|
||||||
- magnet
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{- $hostname := output "scutil" "--get" "ComputerName" | trim -}}
|
{{- $hostname := output "scutil" "--get" "ComputerName" | trim -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $choices := list "wsl" "devterm" "personal" "work" -}}
|
{{- $choices := list "personal" "work" -}}
|
||||||
{{- $hosttype := promptChoiceOnce . "hosttype" "What type of host are you on" $choices -}}
|
{{- $hosttype := promptChoiceOnce . "hosttype" "What type of host are you on" $choices -}}
|
||||||
|
|
||||||
{{ $name := promptString "name" -}}
|
{{ $name := promptString "name" -}}
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
{{- if eq .hosttype "devterm" }}
|
|
||||||
["ttyscheme"]
|
|
||||||
type = "git-repo"
|
|
||||||
url = "https://github.com/kolunmi/ttyscheme.git"
|
|
||||||
refreshPeriod = "168h"
|
|
||||||
{{- end }}
|
|
||||||
[".config/zellij/plugins/room.wasm"]
|
[".config/zellij/plugins/room.wasm"]
|
||||||
type = "file"
|
type = "file"
|
||||||
url = "https://github.com/rvcas/room/releases/latest/download/room.wasm"
|
url = "https://github.com/rvcas/room/releases/latest/download/room.wasm"
|
||||||
|
|
|
@ -9,6 +9,3 @@
|
||||||
zcompile "$zcompdump"
|
zcompile "$zcompdump"
|
||||||
fi
|
fi
|
||||||
} &!
|
} &!
|
||||||
|
|
||||||
# this seems like the easiest way to get a wsl startup script to work
|
|
||||||
2>/dev/null 1>/dev/null mpd
|
|
||||||
|
|
|
@ -62,41 +62,6 @@ done
|
||||||
|
|
||||||
alias devlog="cd ~/projects/personal/devlog && hx logs/$(date '+%Y-%m-%d').gmi && cd -"
|
alias devlog="cd ~/projects/personal/devlog && hx logs/$(date '+%Y-%m-%d').gmi && cd -"
|
||||||
|
|
||||||
{{- if eq .chezmoi.hostname "devterm" }}
|
|
||||||
function battery() {
|
|
||||||
upower -i /org/freedesktop/UPower/devices/battery_axp20x_battery
|
|
||||||
}
|
|
||||||
|
|
||||||
function battery_percentage() {
|
|
||||||
battery | grep 'percentage' | awk '{print $2}'
|
|
||||||
}
|
|
||||||
|
|
||||||
function battery_time_to_empty() {
|
|
||||||
battery | grep 'time to empty' | awk '{print $4, $5}'
|
|
||||||
}
|
|
||||||
|
|
||||||
export LPDEST=devterm_printer
|
|
||||||
alias receipt="lp"
|
|
||||||
|
|
||||||
function receipt_feed () {
|
|
||||||
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" > /tmp/DEVTERM_PRINTER_IN
|
|
||||||
}
|
|
||||||
|
|
||||||
function brightness_half {
|
|
||||||
brightnessctl set 5
|
|
||||||
}
|
|
||||||
|
|
||||||
function brightness_max {
|
|
||||||
brightnessctl set 9
|
|
||||||
}
|
|
||||||
|
|
||||||
function brightness_min {
|
|
||||||
brightnessctl set 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# ttyscheme
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{ if eq .hosttype "work" "personal" -}}
|
{{ if eq .hosttype "work" "personal" -}}
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
pid_file "~/.config/mpd/mpd.pid"
|
|
||||||
playlist_directory "~/.config/mpd/playlists"
|
|
||||||
|
|
||||||
music_directory "http://anonymous@wren.local:5005/music"
|
|
||||||
|
|
||||||
database {
|
|
||||||
plugin "proxy"
|
|
||||||
host "wren.local"
|
|
||||||
}
|
|
||||||
|
|
||||||
audio_output {
|
|
||||||
type "pulse"
|
|
||||||
name "spleen"
|
|
||||||
server "/mnt/wslg/PulseServer"
|
|
||||||
}
|
|
|
@ -2,20 +2,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
{{ if eq .hosttype "devterm" -}}
|
{{ if eq .hosttype "personal" -}}
|
||||||
sudo apt install \
|
|
||||||
brightnessctl \
|
|
||||||
git \
|
|
||||||
libncurses-dev \
|
|
||||||
libssl-dev \
|
|
||||||
lynx \
|
|
||||||
ripgrep \
|
|
||||||
tree \
|
|
||||||
wget \
|
|
||||||
zsh \
|
|
||||||
-y
|
|
||||||
|
|
||||||
{{ else if eq .hosttype "personal" -}}
|
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
brew install \
|
brew install \
|
||||||
|
@ -52,19 +39,6 @@ nvm use 22
|
||||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
uv tool install --force --python python3.12 aider-chat@latest
|
uv tool install --force --python python3.12 aider-chat@latest
|
||||||
|
|
||||||
{{ else if eq .hosttype "wsl" -}}
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install \
|
|
||||||
build-essential \
|
|
||||||
clang \
|
|
||||||
libssl-dev \
|
|
||||||
pkg-config \
|
|
||||||
ripgrep \
|
|
||||||
tree \
|
|
||||||
wget \
|
|
||||||
yazi \
|
|
||||||
-y
|
|
||||||
|
|
||||||
{{ else if eq .hosttype "work" -}}
|
{{ else if eq .hosttype "work" -}}
|
||||||
{{ join .chezmoi.sourceDir "encrypted_work_packages.age" | include | decrypt -}}
|
{{ join .chezmoi.sourceDir "encrypted_work_packages.age" | include | decrypt -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue