Dotfiles repository for hmvege, managed with Chezmoi.
Feel free to use on your own risk, or to draw inspiration.
The goal for this dotfiles project repository, is following,
- Have a, as close to as possible, fully automatized dotfiles setup.
- Have the setup install packages automatically.
- Have a cross-platform dotfiles setup, working for
- MacOS
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
- Rocky8
- WSL 2
- Windows 11
- Have it be easily maintained. I.e. changes applied at one machine, will be easily transferable to another machine.
During the installation, you'll be asked:
- Whether to install GUI apps (e.g., VSCode, Sublime, fonts), with auto-detected recommendation.
- Whether to perform a minimal (lite) setup. If
litemode is selected, GUI apps will automatically be skipped (e.g. VSCode, Sublime, tmux, Gogh etc.). - Mail used for GitHub.
Install Chezmoi and initialize, ensure curl and sudo is installed,
apt-get update && apt-get install -y curl sudothen download and apply the dotfiles,
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin/" init -S ~/dotfiles --apply hmvegewhich will download the Chezmoi binary to $HOME/bin, and use ~/dotfiles as source for Chezmoi by downloading this repository to this location.
On MacOS, you should be able to install Chezmoi via
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin/" init -S ~/dotfiles --apply hmvegeThe dotfiles for Windows is targeting PowerShell. Install Chezmoi via,
iex "&{$(irm 'https://get.chezmoi.io/ps1')} -b '~/bin' -- init -S ~/dotfiles --apply hmvege"The dotfiles setup will download the latest PowerShell 7.4.1.
Pull latest changes from repository.
chezmoi update -v -S ~/dotfilesApply the changes made to the dotfiles made through chezmoi edit [$FILE]
chezmoi apply -v -S ~/dotfiles-v displays what changes is being made. If -n, a dry run will be performed.
Apply the changes made to the dotfiles made through chezmoi edit [$FILE]
chezmoi add -S ~/dotfiles <dotfile-path>-v displays what changes is being made. If -n, a dry run will be performed.
In the case you wish to remove the dotfiles, run
chezmoi purge -S ~/dotfilesIf the prompt for GitHub mail (or similar templated parameters) are not prompted, this can be initialized by running
chezmoi init -S ~/dotfilesand then the dotfiles can be applied again.
fzffuzzy searching.fdbetterfind.lsd. Prettiesls.tmux. Terminal multiplexer.tmux-plugins. Plugins fortmux.vimandvim plugins. On-the-go editor.pyenvandpyenv-virtualenv. Python virtual environment handler.zshandohmyzsh. Shell and zsh framework.pipx. For installing pip packages in independent Python environments.gogh. Terminal colors.zoxide. Better change directorycd.
Plugins used in Vim is,
ohmyzsh is used as framework for managing the zsh configuration.
Following plugins are used:
- colored-man-pages
- copybuffer
- copypath
- copyfile
- git
- history
- jsontools
- sublime
- tmux
- z
- zsh-autosuggestions
- zsh-syntax-highlighting
VSCode is now the preferred Editor.
Sublime Text 4 still installed for a full Linux and MacOS setup, even tho VSCode is now the preferred editor. Package Control is used for managing plugins in ST4.
A basic Vim setup is installed.
Terminal color provided by Gogh, using the theme Afterglow.
To manually test that the dotfiles work as intended, you can use the Dockerfiles found in tests.
Build docker image as,
docker build \
--build-arg UBUNTU_VERSION=22.04 \
--build-arg GIT_BRANCH=master \
-f tests/LinuxUbuntu/Dockerfile \
-t dotfiles-ubuntu-img --progress=plain . You can then enter the image and run the dotfiles as,
docker run -it -d --name ubuntu-dotfiles-test-1 dotfiles-ubuntu-img:latest
docker exec -it ubuntu-dotfiles-test-1 bashOnce inside,
chezmoi update -n # To ensure the latest changes are picked up
chezmoi apply # To start installing dotfilesTo clean up, run
docker stop ubuntu-dotfiles-test-1 && docker rm ubuntu-dotfiles-test-1Build docker image as,
docker build \
--build-arg GIT_BRANCH=master \
-f tests/LinuxRocky/Dockerfile \
-t dotfiles-rocky-test --progress=plain . You can then enter the image and run the dotfiles as,
docker run -it -d --name rocky-dotfiles-test-1 dotfiles-rocky-test:latest bash
docker exec -it rocky-dotfiles-test-1 bashOnce inside,
chezmoi --version || echo "Chezmoi is missing!"
chezmoi update -n # To ensure the latest changes are picked up
chezmoi apply # To start installing dotfilesTo clean up, run
docker stop rocky-dotfiles-test-1 && docker rm rocky-dotfiles-test-1
docker rmi dotfiles-rocky-testThis also runs as a GitHub actions pipeline.
To test on windows, you can run and test in [Sandbox mode](https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/. The config file can be something like,
<Configuration>
<MemoryInMB>8192</MemoryInMB>
<ProcessorCount>8</ProcessorCount>
<VGpu>Enable</VGpu>
<LogonCommand>
<Command>powershell.exe -ExecutionPolicy Bypass -NoLogo -NoExit</Command>
</LogonCommand>
</Configuration>
Once started, run the following commands
# For faster downloading and installing
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CI\Policy' -Name 'VerifiedAndReputablePolicyState' -Value 0
& "$env:windir\System32\CiTool.exe" -r
Set-ExecutionPolicy Bypass -Scope Process -Force
iex "& { $(irm 'https://get.chezmoi.io/ps1') } -b '~/bin' -- init --branch <branch-to-test> --apply hmvege"
The pipeline will also run tests on the windows setup.
The pipeline will run tests on the MacOS setup.
If the shell is not changed, run chsh and set the path to the new shell, and then re-log into your user.
If terminal theme does not change, create a new profile which you names Default and restart the terminal and then rerun.
After installing the theme, make sure the profile is selected to be the installed one.
dotfiles
βββ README.md
βββ bin
β βββ chezmoi
βββ home
βββ .chezmoiexternal.toml
βββ .chezmoiignore
βββ dot* (dotfiles)
βββ .chezmoiscripts
β βββ run_once_after* (scripts that run after core installation)
β βββ run_once_core_linux.sh.tmpl
β βββ run_once_core_osx.sh.tmpl
βββ dot_config
βββ dotfiles stored in ~/.config
- Chezmoi documentation
- Order of Chezmoi
- A good introduction to Chezmoi can be found here
- Basic usage of Chezmoi is located here
- tmux cheat sheet
- https://github.com/renemarc/dotfiles
- https://github.com/narze/dotfiles
- https://github.com/mkasberg/dotfiles
- https://github.com/goooseman/dotfiles
- https://github.com/twpayne
- Script for installing fonts: https://gist.github.com/matthewjberger/7dd7e079f282f8138a9dc3b045ebefa0
MIT License.