A collection of PowerShell files for Windows, including common application installation through Chocolatey
and npm
, and developer-minded Windows configuration defaults.
Are you a Mac user? Check out my dotfiles repository.
You can clone the repository wherever you want. (I like to keep it in ~\Projects\dotfiles-windows
.) The bootstrapper script will copy the files to your PowerShell Profile folder.
From PowerShell:
git clone https://github.com/jayharris/dotfiles-windows.git; cd dotfiles-windows; . .\bootstrap.ps1
To update your settings, cd
into your local dotfiles-windows
repository within PowerShell and then:
. .\bootstrap.ps1
Note: You must have your execution policy set to unrestricted (or at least in bypass) for this to work: Set-ExecutionPolicy Unrestricted
.
To install these dotfiles from PowerShell without Git:
iex ((new-object net.webclient).DownloadString('https://raw.github.com/jayharris/dotfiles-windows/master/setup/install.ps1'))
To update later on, just run that command again.
Note: You must have your execution policy set to unrestricted (or at least in bypass) for this to work: Set-ExecutionPolicy Unrestricted
.
If .\extra.ps1
exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don't want to commit to a public repository.
My .\extra.ps1
looks something like this:
# Hg credentials
# Not in the repository, to prevent people from accidentally committing under my name
Set-Environment("EMAIL", "Jay Harris <jay@aranasoft.com>", "User")
# Git credentials
# Not in the repository, to prevent people from accidentally committing under my name
Set-Environment("GIT_AUTHOR_NAME","Jay Harris","User")
Set-Environment("GIT_COMMITTER_NAME", $env:GIT_AUTHOR_NAME, "User")
git config --global user.name $env:GIT_AUTHOR_NAME
Set-Environment("GIT_AUTHOR_EMAIL","jay@aranasoft.com", "User")
Set-Environment("GIT_COMMITTER_EMAIL",$env:GIT_AUTHOR_EMAIL, "User")
git config --global user.email $env:GIT_AUTHOR_EMAIL
Extras is designed to augment the existing settings and configuration. You could also use ./extra.ps1
to override settings, functions and aliases from my dotfiles repository, but it is probably better to fork this repository.
When setting up a new Windows PC, you may want to set some Windows defaults and features, such as showing hidden files in Windows Explorer and installing IIS. This will also set your machine name and full user name, so you may want to modify this file before executing.
. .\windows.ps1
When setting up a new Windows box, you may want to install some common Chocolatey packages (it will also install chocolatey, if it isn't already).
. .\chocolatey.ps1
In addition to the applications provided by Chocolatey, you may also like some common applications that are provided by Node via NPM. (Node is required, and can be installed via Chocolatey.)
. .\npm.ps1
This repository is built around how I use Windows, which is predominantly in a VM hosted on OSX. As such, things like VNC or Ruby or FileZilla or Skype are not installed, as they are available to me on the OSX side, installed by my OSX dotfiles. If you are using Windows as your primary OS, you may want a different configuration that reflects that, and I recommend you fork this repository.
If you do fork for your own custom configuration, you will need to touch a few files to reference your own repository, instead of mine.
Within /setup/install.ps1
, modify the Repository variables.
$account = "jayharris"
$repo = "dotfiles-windows"
$branch = "master"
Also, be sure to reference your own repository in the git-free installation command.
iex ((new-object net.webclient).DownloadString('https://raw.github.com/$account/$repo/$branch/setup/install.ps1'))
Suggestions/improvements are welcome and encouraged!
Jay Harris |
- @Mathias Bynens for his OSX dotfiles, which this repository is modeled after.