Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romkatv/dotfiles-public
Public part of my dotfiles
https://github.com/romkatv/dotfiles-public
Last synced: 9 days ago
JSON representation
Public part of my dotfiles
- Host: GitHub
- URL: https://github.com/romkatv/dotfiles-public
- Owner: romkatv
- Created: 2019-02-19T09:32:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T08:39:02.000Z (2 months ago)
- Last Synced: 2024-10-19T05:49:18.222Z (22 days ago)
- Language: Shell
- Homepage:
- Size: 8.41 MB
- Stars: 291
- Watchers: 16
- Forks: 92
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
### Github Setup
This needs to be done once per user.
#### Set up dotfiles-public repo.
- Go to https://github.com/romkatv/dotfiles-public and click *Fork*.
- Replace "romkatv" and "[email protected]" in `.gitconfig` of the newly created fork with your own data. You can do it thrugh the GitHub web UI.#### Set up dotfiles-private repo.
- Go to https://github.com/new and create an empty `dotfiles-private` repo. Make it private.
#### Set up ssh keys.
- Generate a pair of ssh keys -- `rsa_id` and `rsa_id.pub` -- and add `rsa_id.pub` to github.com. See https://help.github.com/en/articles/connecting-to-github-with-ssh for details. Use a strong passphrase.
- Backup `rsa_id` in a secure persistent storage system. For example, in your password manager.### Windows Setup
#### Windows Preparation
This needs to be done once per Windows installation. You don't need to repeat these steps when reinstalling Ubuntu.
- Download these four ttf files:
- [MesloLGS NF Regular.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf)
- [MesloLGS NF Bold.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf)
- [MesloLGS NF Italic.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf)
- [MesloLGS NF Bold Italic.ttf](
https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf)
- Double-click on each file and click "Install". This will make `MesloLGS NF` font available to all
applications on your system.
- Open *PowerShell* as *Administrator* and run:
```powershell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
```
- Reboot if prompted.
- Install chocolatey from https://chocolatey.org/install.
- Open *PowerShell* as *Administrator* and run:
```powershell
choco.exe install -y microsoft-windows-terminal vcxsrv
```
- Run *Start > XLaunch*.
- Click *Next*.
- Click *Next*.
- Uncheck *Primary Selection*. Click *Next*.
- Click *Save Configuration* and save `config.xlaunch` in your `Startup` folder at `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup`.
- Click *Finish*.Optional: if disk `D:` does not exist, make it an alias for `C:`. If you don't know why you might want this, then you don't need it.
- Open *PowerShell* as *Administrator* and run:
```powershell
if (!(Test-Path -Path "D:\")) {
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices" -Name "D:" -PropertyType String -Value \DosDevices\C:\ -Force
}
```
- Reboot.#### WSL Removal
Follow these steps to remove your Linux distro with all files (applications, settings, home directory, etc.). You can recreate it by following [WSL Installation](#wsl-installation) guide below.
- Find out the name of your default distro by running the following command from *PowerShell*:
```powershell
wsl.exe --list
```
- Delete a distro:
```powershell
wsl.exe --terminate DISTRO
wsl.exe --unregister DISTRO
```#### WSL Installation
These steps allow you to recreate the whole WSL environment. Before proceeding, delete the current distro if you have it. See [WSL Removal](#wsl-removal).
- Download `id_rsa` into the Windows `Downloads` folder. It's OK if it's downloaded as `id_rsa.txt`.
- Run these commands from *PowerShell*:
```powershell
wsl.exe --set-default-version 1
wsl.exe --install -d Ubuntu-22.04
```
- When prompted, create a new user.
- Type this (change the value of `GITHUB_USERNAME` if it's not the same as your WSL username):
```bash
GITHUB_USERNAME=$USER bash -c \
"$(curl -fsSL 'https://raw.githubusercontent.com/romkatv/dotfiles-public/master/bin/bootstrap-machine.sh')"
```
- Say `Yes` when prompted to terminate WSL.
- Run *Start > Windows Terminal*.
- Press Ctrl+Shift+,.
- Replace the content of `settings.json` with [this](https://raw.githubusercontent.com/romkatv/dotfiles-public/master/dotfiles/microsoft-terminal-settings.json). Change "romkatv" to your WSL username.#### Optional: Windows Defender Exclusion
- Run *Start > Windows Security*.
- Click *Virus & threat protection*.
- Click *Manage settings* under *Virus & threat protection settings*.
- Click *Add or remove exclusions* under *Exclusions*.
- Click *Add an exclusion > Folder*.
- Select `%USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc`.### Maintenance
Run this command occasionally.
```zsh
sync-dotfiles && bash ~/bin/setup-machine.sh && z4h update #maintenance
```Pro tip: Copy-paste this whole command including the comment. Next time when you decide to run maintenance tasks, press `Ctrl+R` and type `#maintenance`. This is how you can "tag" commands and easily find them later. You can apply more than one "tag". Technically, everything after `#` is a comment.