feat manage script
This commit is contained in:
117
README.md
Normal file
117
README.md
Normal file
@@ -0,0 +1,117 @@
|
||||
# dotfiles
|
||||
```shell
|
||||
git clone https://gitea.tomastm.com/tomas.mirchev/dotfiles.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
./install.py
|
||||
```
|
||||
|
||||
Do not forget to change the remote from https to ssh
|
||||
```shell
|
||||
git remote set-url origin git@gitea.tomastm.com:tomas.mirchev/dotfiles.git
|
||||
git remote -v
|
||||
```
|
||||
|
||||
### Todo
|
||||
- [ ] Uninstall option
|
||||
- [ ] Fix inconsistencies with usage fn
|
||||
|
||||
---
|
||||
|
||||
# Notes for README
|
||||
- How to update dotfiles? By default, they are symlinked.
|
||||
-> Directly modify `config/shared/<config>` or `config/envs/<env>/<config>`
|
||||
-> If new config, add it to `config.json` too.
|
||||
-> And simply run `./manage.py link <env>`. If needed, do not forget to update the `config.json#install` or `homebrew dump`.
|
||||
- How to unlink?
|
||||
-> Just remove the symlink and unspecify it from `config.json` to keep it updated for the future.
|
||||
|
||||
# Files and steps
|
||||
Scripts:
|
||||
- macos-save_homebrew.sh
|
||||
- macos-install_homebrew.sh
|
||||
- macos-change_hostname --hostname
|
||||
- linux-setup_docker.sh
|
||||
- linux-change_hostname --hostname
|
||||
- setup_shh.sh -C $USER@$HOSTNAME -f internal|git|none
|
||||
|
||||
Setups:
|
||||
- macos (--hostname)
|
||||
- linux-vm (--hostname)
|
||||
- linux-dev
|
||||
|
||||
|
||||
# For MacOS
|
||||
```
|
||||
$ git clone https://gitea.tomastm.com/tomas.mirchev/dotfiles.git .dotfiles
|
||||
$ cd .dotfiles
|
||||
$ ./manage.py setup macos --hostname macbook-pro
|
||||
-> Install homebrew
|
||||
-> Install all apps from dump (also stored in ./config/envs/macos)
|
||||
-> run: ./manage.py link macos (git, zsh, nvim-vanilla, tmux, karabiner, linearmouse, ghostty)
|
||||
-> from shared: git, zsh, tmux, nvim-simple
|
||||
-> from env macos: karabiner, linearmouse, ghostty
|
||||
-> execute: ./scripts/macos-change_hostname --hostname $HOSTNAME
|
||||
-> execute: ./scripts/setup_ssh.sh -C $USER@$HOSTNAME -f internal (-f: id_ed25519_internal)
|
||||
-> execute: ./scripts/setup_ssh.sh -C $USER@$HOSTNAME -f git (-f: id_ed25519_git)
|
||||
-> echo: "internal key generated, once vms and dns are ready: ssh-copy-id tomas@ip"
|
||||
-> echo: "You ssh pub key is: <key>". do not forget to change from https to git
|
||||
-> echo: "Do not forget to change git remote from https to git after adding SSH Key"
|
||||
-> echo: "Next steps: setup UTM and DNS" (maybe store DNS settings in private repo)
|
||||
-> todo: Add WindowTagger automatically too. In the meantime, echo it and reference to the repo.
|
||||
```
|
||||
|
||||
# For LinuxVM
|
||||
## Create VM
|
||||
### MacOS host with UTM
|
||||
- Download the ISO for architecture ARM64.
|
||||
- Create the VM with UTM.
|
||||
- It is recommended to setup local DNS with `dnsmasq`.
|
||||
|
||||
### Other hosts
|
||||
- Download the ISO for architecture AMD64.
|
||||
- Setup Proxmox and create the VM.
|
||||
|
||||
## Setup VM
|
||||
```
|
||||
$ git clone https://gitea.tomastm.com/tomas.mirchev/dotfiles.git .dotfiles
|
||||
$ cd .dotfiles
|
||||
$ ./manage.py setup linux-vm --hostname <personal|university|client>-<utm|workstation>
|
||||
-> execute: ./scripts/linux-setup_sudoers.sh
|
||||
-> execute: mkdir /home/$USER/projects
|
||||
-> execute: ./scripts/linux-setup_docker.sh
|
||||
-> execute: ./scripts/linux-change_hostname.sh --hostname $HOSTNAME
|
||||
-> execute: ./scripts/setup_ssh.sh -C $USER@HOSTNAME -f "" (-f: id_ed25519)
|
||||
-> run: ./manage.py install linux-vm
|
||||
-> run: ./manage.py link linux-vm
|
||||
-> from shared: git, zsh, tmux, nvim-simple
|
||||
-> echo: "You ssh pub key is: ". do not forget to change from https to git
|
||||
-> echo: "use `dev` for bla bla"
|
||||
```
|
||||
|
||||
# For LinuxDev
|
||||
Build with multi-stage.
|
||||
|
||||
## base-debian
|
||||
### Stage 1 - Setup NeoVim
|
||||
```
|
||||
RUN apt install python3
|
||||
RUN git clone https://gitea.tomastm.com/tomas.mirchev/dotfiles.git .dotfiles \
|
||||
&& cd .dotfiles \
|
||||
&& ./manage.py setup linux-dev
|
||||
-> wget tree-sitter && move (check architecture)
|
||||
-> wget nvim.deb && install (check architecture)
|
||||
-> nvim !lazy restore plugins
|
||||
```
|
||||
### Stage 2
|
||||
- copy-from: .dotfiles & `./setup.py --env-linux-c --copy`
|
||||
- copy-from: tree-sitter
|
||||
- copy-from: `nvim.deb` & `apt install ./nvim.deb`
|
||||
- copy-from: .local/share/nvim
|
||||
- Setup locales (check debian setup)
|
||||
- Create dev user
|
||||
- Create workspace directory
|
||||
|
||||
## node
|
||||
|
||||
## python
|
||||
|
||||
Reference in New Issue
Block a user