Warning: Use at your own risk. Please acknowledge for what you are copying and what you are using it for.
- Easy to install packages.
- Secure your dotfiles in the
private
folder. - Easy to add your specific tools.
-
Git
should be installed on your system:sudo apt-get install git
-
Bash shell support.
-
Run from script:
File
install.sh
will clone this repository in~/dotfiles
and runbootstrap.sh
to install all packages and dotfiles.curl -sSL https://raw.githubusercontent.com/DuckyMomo20012/dotfiles/main/install.sh | bash -
-
Run manually:
Clone the project:
git clone https://github.com/DuckyMomo20012/dotfiles.git
Go to the project directory:
cd dotfiles
Run the bootstrap script:
./bootstrap.sh
Note: This project is tested on Ubuntu 22.04.1 LTS and Ubuntu 22.10.
File bootstrap.sh
will find all setup.sh
files in all directories and
run it. But before that, it will run setup.sh
in the packages
directory, to
make sure all dependency packages are installed.
asdf
: Setup theasdf
tool version manager and install plugins.completions
: Setupbash
completions.crontab
: Setup cron jobs.devops
: Setup DevOps tools.dotfiles
: Setup dotfiles.gpg
: Scripts to encrypt files in theprivate
directory or export/importgpg
keys.ibus-bamboo
: Setupibus-bamboo
Vietnamese input method.misc
: Miscellaneous scripts.packages
: Install packages.poetry
: Setuppoetry
Python package manager.private
: Private dotfiles, will be ignored and encrypted.private/dotfiles-example
: Example private dotfiles configuration.
utils
: Utility scripts for this project.zsh
: Setupzsh
shell.
Each directory will have a README.md
file to explain what it does and how to
customize.
Assume your current directory has this structure:
.
├── Other packages
│ └── zoom_amd64.deb
├── bootstrap.sh
├── google-chrome-stable_current_amd64.deb
└── secret.asc
Then the code below will do the following:
- Install
.deb
packages in the top-level directory, but other packages in a nested directory, e.g.Other packages
won't be installed. - Download the file
install.sh
from this repository and run it. - Import the secret key from the
secret.asc
file. - Decrypt the
private
directory.
Note:
secret.asc
file should be a secret key file, not a public key file.
Note: Please replace
<YOUR-PASSWORD>
with your passphrase, or you can remove it and enter your passphrase when prompted.
Every step is run seamlessly without any prompts, so you won't have any interruptions during running the script.
#!/usr/bin/env bash
curr_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# We have cd to directory to make sure find only searches in this directory
cd "$curr_dir"
mkdir -p "/tmp/packages/"
find * -maxdepth 0 -name "*.deb" -type f | while read package; do
cp "$curr_dir/$package" "/tmp/packages"
sudo apt install -y "/tmp/packages/$package"
done
rm -rf "/tmp/packages/"
sudo apt-get install -y curl git
curl -sSL https://raw.githubusercontent.com/DuckyMomo20012/dotfiles/main/install.sh | bash -
$HOME/dotfiles/gpg/import.sh -f "$curr_dir/secret.asc"
$HOME/dotfiles/gpg/dedot.sh -p "<YOUR-PASSWORD>"
- Colorize output.
Contributions are always welcome!
Please read the Code of Conduct.
-
Is this project still maintained?
- Yes, I will add more dotfiles when I use new tools or have some modifications to my current dotfiles.
-
Is this project support other Linux distributions or MacOS?
- I don't know, because I don't have time to test it, so some scripts may not work on other distributions. But you can try it and let me know if it works.
Distributed under MIT license. See LICENSE for more information.
Duong Vinh - @duckymomo20012 - [email protected]
Project Link: https://github.com/DuckyMomo20012/dotfiles.
Here are useful resources and libraries that I have used in my projects:
-
Awesome Readme Template: A detailed template to bootstrap your README file quickly.
-
rkalis/dotfiles: A good dotfiles project that inspired me with the keep sudo alive approach, extract install command from file name and some other things.
-
holman/dotfiles: Good folder structure and symlink approach.
-
explainshell.com: A website to explain shell commands.
-
ShellCheck: Finds bugs in your shell scripts.
-
DOCOPT: Command-line interface description language.
-
Command Line Interface Guidelines: An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.