These are my configuration files and setup scripts for new Windows computers. If using Windows, I use Windows 10 with the Ubuntu Windows Linux Subsystem. In most cases these dotfiles will work on similar systems. Fork if you wish but keep in mind that a lot of these settings are personalized to me (so you will most likely want to change them before using the scripts). Review the code, and remove things you don't want or need. Do not blindly use these settings.
Inspired by: https://dotfiles.github.io/ and https://github.com/jayharris/dotfiles-windows
Table of Contents
- Install Windows
- Install and configure all additional hardware-specific Windows drivers (usually found on your backup drive or in the cloud)
- Install Dropbox manually
- Install GitBash manually
- Open a PowerShell as an administrator and set your ExecutionPolicy:
Set-ExecutionPolicy RemoteSigned - Allow .NET packages to be installed via NuGet:
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force - Install Chocolatey from a privileged PowerShell:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - Close PowerShell
- Install C++ 2015 manually (this is a VS Code dependency)
- Install VS Code manually
- Install Settings Sync for VS Code
- Get Gist Token from secret hiding place
- Type
syncin the Command Palette in VS Code and copy/paste your GitHub token and Gist ID - Wait for all your extensions and themes to sync up and then close VS Code (your text editor is ready to roll!)
- Using GitBash, clone this repo into your home folder:
cd ~ && git clone git@github.com:jonathanbell/.dotfiles-windows.git .dotfiles && cd ~/.dotfilesImportant: (note that we clone.dotfiles-windowsto the.dotfilesdirectory) - Install Ubuntu on Windows 10 from the Windows App Store
- Set your Ubuntu/Linux home directory to be the same as your Windows home folder
- Install Photoshop manually
- Install Lightroom manually
- Install Premier manually
- Install MovesLink manually
- Uninstall unwanted apps by right-clicking them in the Start Menu
- Copy (or symlink) SSH
configfile from your secret hiding place to~/.sshor setup new ones.- From the Linux command line
ln -s /path/to/secret/hiding/place ~/.ssh
- From the Linux command line
- Optional: You may need to setup permissions for SSH keys to work correctly on the Linux/Windows Subsystem. Edit
/etc/wsl.conf(add it if it does not exist) using the following code block and then change the permissions of the private key directory to700and all the keys inside the directory to600.
- Open PowerShell as an admin
- Change directory your .dotfiles directory:
cd $HOME\.dotfiles - Then execute the
new-computer.ps1script in order to install and configure all the Windows things:.\new-computer.ps1
The following instructions are meant to be run inside the Windows Subsystem for Linux command line. Open that command prompt and run:
cd ~/.dotfiles && chmod +x new-computer.bash./new-computer.bash
- Copy your Cloudinary config file from your secret hiding place to
~/.cloudinary
You can now upload images to Cloudinary with cloudinary upload foo.png
- Enable/give priority to
.phpfiles:sudo nano /etc/apache2/mods-enabled/dir.confand moveindex.phpto the front of the list. - Open
ports.conf:cd /ect/apache2 && sudo nano ports.confand make these changes:- Change the default port (80) to 8080
- Open
apache2.conf:sudo nano apache2.confand make the following changes:- Add
AcceptFilter http noneandAcceptFilter https noneto the end of the file. - Change
<Directory /var/www/>to<Directory /mnt/c/Users/path/to/your/sites> - Also ensure that
AllowOverrideis set toAll(in order to allow.htaccessfiles to do their thing)
- Add
- For each locally hosted website that you have, add a
<VirtualHost>entry to000-default.conf:cd sites-enabled && sudo nano 000-default.conf.- For each site, copy+paste the block below and edit it to suit your needs:
<VirtualHost *:443> DocumentRoot "/mnt/c/Users/<your username>/path/to/site" ServerName dev.localhost.com # change to whatever you like SSLEngine on SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem" SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key" ErrorLog "/mnt/c/Users/<your username>/path/to/error/logs/dev.localhost.com.errors" CustomLog "/mnt/c/Users/<your username>/path/to/custom/logs/dev.localhost.com.log" common </VirtualHost>
- Edit the
hostsfile on the Windows side of things. The file will be located inC:\Windows\System32\Drivers\etc\.- Add your local domain like so:
127.0.0.1 dev.localhost.com
- Add your local domain like so:
- Ensure that
mod_rewriteandmod_expiresare enabled:sudo cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load && sudo cp /etc/apache2/mods-available/expires.load /etc/apache2/mods-enabled/expires.load - Finally, ensure permissions are correct on the directory where you keep your website code:
sudo chmod 775 -R /mnt/c/Users/<your username>/path/to/websites/