Awesome Open Source
Awesome Open Source

Dotfiles & Developer Environment Lint

Cross-platform dotfiles & developer environment for PopOS (Ubuntu), macOS Catalina+ & Windows 11 with WSL2

Install with curl bash which will download, clone and execute script:

curl -fsSL https://raw.githubusercontent.com/jthegedus/dotfiles/main/dotfiles.bash | bash

Always read script contents before executing via "curl-bash" - read Friends don't let friends Curl | Bash

Run install script locally after clone:

git clone https://github.com/jthegedus/dotfiles ~/projects/dotfiles
bash ~/projects/dotfiles/dotfiles.bash

Contents

Types of Software

There are 2 categories of software:

  1. install once with rolling version updates: OS, browsers, editors, shells, prompts etc.
  2. install multiple times & pin to specific versions: runtimes and tools used to develop & build projects defined on a per-project basis (asdf as an example)
Available solutions to this problem

How you manage and install these 2 categories of software is very difficult to maintain, especially across multiple machines and OSs. How should you manage dependencies that span the boundaries of these two types of top-level software categories? Eg: your browser could require a dependency to be updated that is used by a pinned version of a runtime used for a specific project. There doesn't seem to be a perfect solution.

Desired properties to tackle this problem can be observed below:

tool os-level install manages dep graph version pinning per-project Debian/Ubuntu Windows11 (non-WSL) macOS
aptitude
Homebrew
asdf
Nix *
Docker/Vagrant *

NixOS appears to be the best solution to this problem. Unfortunately it does not support windows11, NixOS is itself an operating system and configuration requires learning the .nix language.

In my opinion rolling version updates should use the systems native package manager. And unless you're willing to put in the hours to learn Nix then asdf is a decent fit for version pinning per-project.

Installled with script

Rolling Version Software

  • nushell: a new type of shell
  • starship: cross-shell theme
  • asdf: Manage multiple runtime versions with a single CLI tool
  • powerline fonts
  • ripgrep: recursively search directories for a regex pattern while respecting your gitignore
  • zoxide: A smarter cd command
  • bat: A cat(1) clone with wings
  • fd: A simple, fast and user-friendly alternative to 'find'

Pinned Version Software

Naturally these should be managed per-project for which we have chosen asdf.

Other Useful Software

Not installed automatically with this repo's script, but worth looking into:

Fonts

PopOS / Gnome stuff

I rely on the PopOS distro for:

  • tiling behaviour in Gnome as previous extensions I used were not as reliable
  • make tab switching swap all app windows not just apps: Settings > Keyboard > customize keyboard shortcuts > Navigation > Switch Windows: set to use the keyboard combo you like, eg: alt+tab

Gnome Extensions:

  • Caffeine: Disable the screensaver and auto suspend

Uninstall

curl -fsSL https://raw.githubusercontent.com/jthegedus/dotfiles/dotfiles.bash | bash -- -s --uninstall

or locally

bash ~/projects/dotfiles/dotfiles.bash --uninstall

Why Nushell

Nushell has a delightful core set of features that allow easy replacement of many tools. It achieves most of these features by treating "everything as data". For example, jq or jql can be replaced with inbuilt commands:

dotfiles on  main took 521ms 
 fetch https://api.github.com/repos/jthegedus/dotfiles | select created_at

 #       created_at      

 0  2017-03-28T01:04:13Z 



dotfiles on  main 
 (fetch https://api.github.com/repos/jthegedus/dotfiles).created_at
2017-03-28T01:04:13Z

Over the years I have slowly moved from extremely custom systems to a smaller set of more powerful tools allowing the same flexibility. From i3wm on Ubuntu to PopOS with it's tiling defaults, bash -> zsh -> nushell achieves the same simplification of toolset by utilising a newer tool that is built on the experience and learning from the past.

TODO

  • macOS support in installer script
  • native Windows11 support
  • find binary alternative(s) to thefuck
  • per-directory gitconfigs like https://stackoverflow.com/a/43884702
    • global with includes to per-dir configs: ~/.gitconfig -> symlinked to ~/projects/dotfiles/gitconfigs/.global.gitconfig
    • personal: ~/projects/dotfiles/gitconfigs/.personal.gitconfig
    • work: ~/projects/dotfiles/gitconfigs/.work.gitconfig

License

MIT License James Hegedus

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Shell (171,287
Bash (18,677
Dotfiles (10,793
Vscode (10,011
Zsh (7,270
Wsl (1,524
Zshrc (720
Bashrc (362
Ligatures (266
Vscode Settings (70
Nu (36