Skip to content

Commit

Permalink
feat: first integration of several changes from wsl dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
da5atar committed Apr 19, 2021
1 parent aa74e93 commit 4c13414
Show file tree
Hide file tree
Showing 28 changed files with 1,369 additions and 142 deletions.
33 changes: 30 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Created by https://www.toptal.com/developers/gitignore/api/macos
# Edit at https://www.toptal.com/developers/gitignore?templates=macos
#######################################################
# macOS
# Original template created by https://www.gitignore.io/
# Edit at https://www.gitignore.io/
#######################################################

### macOS ###
# General
Expand Down Expand Up @@ -33,4 +36,28 @@ Temporary Items
# history
.history

# End of https://www.toptal.com/developers/gitignore/api/macos
########
# Linux
########

# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim

# Temporary
.netrwhist
*~

# Auto-generated tag files
tags

# Persistent undo
[._]*.un~/

# End
2 changes: 2 additions & 0 deletions .vim/after/syntax/markdown.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
syn match markdownIgnore "\v\w_\w"
set nocursorline
2 changes: 2 additions & 0 deletions LICENSE-MIT.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
The MIT License (MIT)

Copyright Massamba Sow <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining
Expand Down
54 changes: 51 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,60 @@
# Device installation scripts for Mac and Windows (WSL)
## Quickly Get Set Up with These Dotfiles

This repository was inspired by [Mathias Bynens' dotfiles](https://github.com/mathiasbynens/dotfiles) repository and adapted from [Zell Liew's](https://github.com/zellwk/dotfiles).
This repository was inspired by [Mathias Bynens' dotfiles](https://github.com/mathiasbynens/dotfiles) repository and adapted from [Zell Liew's](https://github.com/zellwk/dotfiles) and from [Nick Janetakis's dotfiles](https://github.com/nickjj/dotfiles.git).
Although I copied many things, I also deleted/updated many things to suit my custom installation. Use this at your own risk!

Here are the installation instructions for Mac and Windows (WSL)

- [Mac instructions](mac.md)
- [Windows (WSL) instructions](windows.md)
- [Windows (WSL) and Linux instructions](linux-wsl.md)

Have a suggestion? [Please let me know!](TODO 2 Add link)
```sh
# Create your own personal ~/.gitconfig.user file. After copying the file,
# you should edit it to have your name and email address so git can use it.
cp ~/dotfiles/.gitconfig.user ~/.gitconfig.user
```

Optionally confirm that a few things work after closing and re-opening your
terminal:

```sh
# Sanity check to see if you can run some of the tools we installed.
ruby --version
node --version
# ansible --version
# aws --version
# terraform --version

# Check to make sure git is configured with your name, email and custom settings.
git config --list

# If you're using Docker Desktop with WSL 2, these should be accessible too.
docker info
docker-compose --version
```

#### Using WSL 1 or WSL 2?

In addition to the Linux side of things, there's a few config files that I have
in various directories of this dotfiles repo. These have long Windows paths.

It would be expected that you copy those over to your system while replacing
"Mass" with your Windows user name if you want to use those things, such as my Microsoft Terminal `settings.json` file and others.
Some of the paths may also contain unique IDs too, so adjust them as needed on your end.

Some of these configs expect that you have certain programs or tools installed
on Windows.

Pay very close attention to the `c/Users/Mass/.wslconfig` file because it has
values in there that you will very likely need to change before using it.
[This commit
message](https://github.com/nickjj/dotfiles/commit/d0f1fc2622204b809cf7fcbb1a82d45b451064c4)
goes into the details.

Also, you should reboot to activate your `/etc/wsl.conf` file (symlinked
earlier). That will be necessary if you want to access your mounted drives at
`/c` or `/d` instead of `/mnt/c` or `/mnt/d`.


Have a suggestion? [Please let me know!](mailto:[email protected])
9 changes: 9 additions & 0 deletions c/Users/Mass/.wslconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wsl2]
memory=6GB # Make sure you have this amount available to use!
swapFile=D:\\wsl2-swap.vhdx # I put mine off my SSD, but this is optional.

# Another option is to disable swap but if the VM goes out of memory, the
# OOM killer might start killing important processes or the VM may crash.
#
# Uncomment the line below this to use no swap file at all in the WSL 2 VM.
#swap=0
Loading

0 comments on commit 4c13414

Please sign in to comment.