Skip to content

Feel free to fork and customize if you want a similar setup.

Notifications You must be signed in to change notification settings

jnovick/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

If anyone wants to use this repo that is not me, please fork it and change joshua and Joshua everywhere to your own username. Also, be sure to change to gitconfig to your own git config, but leave the credential section in place. NEVER Commit back sesitive information within any file such as .ssh or the access-token in .kube/config.

Mac Setup instructions

The tools installed for Mac are not the same as those currently configured for Linux/WSL on Windows. This is because my only use-case for Mac is my company laptop at Hunters so I am only installing tools I may need there.

  1. zsh install-software-mac.sh
  2. zsh install.sh
  3. Set iTerm2 Font: https://iterm2.com/documentation-fonts.html. Either choose a Powerline font or enable the built-in powerline characters.
  4. In iTerm2, import the preset colors from One Half Dark - Joshua.itermcolors
  5. Close the terminal and open iTerm2.
  6. Set font in VS Code by adding it to the beginning of the list. For example: "editor.fontFamily": "Hack Nerd Font Mono, DejaVu Sans Mono for Powerline, Menlo, Monaco, 'Courier New', monospace"

Debian/Ubuntu Setup instructions

  1. bash install-software.bash
  2. zsh install.sh
  3. Close and re-open terminal
  4. Done! :)

Main setup plan for WSL on Windows

  1. Install WSL by running this in powershell as admin. It comes from Official MS Docs

    wsl --install
  2. In a non-admin powershell, run this command: wsl --set-default-version 2

  3. Restart computer

  4. Install these apps

    • Windows Terminal and/or Windows Terminal Preview
    • Docker
  5. Open Ubuntu distro for the first time to set up username and password within distro. This is independent of Windows password but can be set the same.

    • To change your password later, run passwd.
  6. Copy windows Terminal settings that you desire from here.

  7. Install Cascadia Code so that we can use Cascadia Code PL font for the special characters.

  8. Configure docker to use WSL2 backend and support the newly set up distro

  9. Confirm docker is working with docker ps. If there are issues, close and reopen wsl and restart docker. That fixed my issues.

  10. Run powershell file: ./powershell/install-dotfiles-and-software.ps1

    • When prompted, enter password. This will happen multiple times.
    • If this does not work, you can use manual instructions for dotfiles below.
  11. To fix VPN issues, use the vpn alias in WSL2 while Windows account has admin access. Once disconnected from VPN, run unvpn in WSL2 or close and re-open it. This could be automated with a scheduled task but this is not supported by the HRB setup.

  12. Configure VS Code to desired settings

    {
      "terminal.integrated.fontFamily": "Cascadia Code PL",
      "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe",
      "dotfiles.repository": "jnovick/dotfiles",
      "terminal.integrated.shell.linux": "/bin/zsh"
    }

Manual instructions for configuring dotfiles on WSL on Windows

If the powershell script above (./powershell/install-dotfiles-and-software.ps1) fails, these steps are the manual equivalent

  1. Clone git repo inside distro

    • Clone must happen on linux file system not Windows unless mount options have been enabled in /etc/wsl.conf. Example settings below, but I recommend still using the linux side.

      [automount]
      options = "metadata,umask=22,fmask=11"
      
      # You can switch this to ssh later if you choose but until ssh keys are created and added in GitHub, you must use https
      git clone https://github.com/jnovick/dotfiles.git
  2. Install dotfiles

    • This can be re-run many times safely to link new files added to repo
    • If the dotfiles already exist, the script will rename them with .<Date-Time>.bak appended to the end
    chmod +x install.sh
    ./install.sh
    
    # Alternatively, instead of using chmod, you could do:
    bash install.sh
  3. Install desired software

    • This will prompt you for your password up to two times and switch default shell to zsh
    • This is not safe to re-run. Manually re-run pieces for updates, but not the whole thing.
bash ./install-software.bash

Testing script with fresh WSL Distro

  1. Run .\powershell\create-throwaway-distro.ps1
  2. Verify everything looks good.
  3. Delete throw away distro: wsl.exe --unregister ubuntu-throwaway-2004

About

Feel free to fork and customize if you want a similar setup.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published