2025-10-05 14:15:07 -05:00
# dot
## Description
There is no place like $HOME. All my dotfiles, and a guide for configuring a new install.
## Table of Contents
- [Description ](#description )
- [Features ](#features )
- [Usage ](#usage )
- [Credits / Resources ](#credits--resources )
- [License ](#license )
## Features / TODOS
+ All my dotfiles.
+ Step by step guide.
+ Resources and references.
+ Current list of recommended software.
## Usage
After installation, you should login as root instead of the user. As this gives us a chance to add users, change passwords, set groups, and change defaults.
2025-10-10 12:04:45 -05:00
Step One: - [ ] Change defaults <br>
I like to change my XDG user directory defaults. Located at `/etc/xdg/user-dirs.defaults` <br>
`wget -O /etc/xdg/user-dirs.defaults https://myrepos.dev/Randy-Jordan/eg/raw/branch/main/dot/xdg/user-dirs.custom` <br>
`curl https://myrepos.dev/Randy-Jordan/eg/raw/branch/main/dot/xdg/user-dirs.custom > /etc/xdg/user-dirs.defaults` <br>
Step Two: - [ ] Add users and assign passwords and groups <br>
2025-10-05 14:15:07 -05:00
Where required, add users to groups such as custom, sudo, dialout etc...<br>
`sudo useradd -m user_variable` <br>
`sudo passwd user_variable` <br>
`sudo usermod -aG user group` <br>
2025-10-10 12:04:45 -05:00
Step Three: - [ ] Removing root login, and copying ssh keys.<br>
2025-10-05 14:15:07 -05:00
Now that we have a new user, we can make some security changes.
`sed -i 's/^PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config` <br>
`sudo systemctl restart sshd` <br>
Create and copy our ssh keys to server or instance.<br>
`ssh-keygen -t ed25519 -C "your_email@example.com"`
`ssh-copy-id username@remote_host`
Disable password logins<br>
`sed -i 's/^PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config` <br>
`sudo systemctl restart sshd` <br>
2025-10-10 12:04:45 -05:00
Step Four: - [ ] Update and upgrade<br>
2025-10-05 14:15:07 -05:00
`sudo apt update` <br>
`sudo apt upgrade` <br>
`sudo apt dist-upgrade` <br>
`sudo apt autoremove` <br>
`sudo apt clean` <br>
2025-10-10 12:04:45 -05:00
Step Five: - [ ] Download Packages
2025-10-05 18:43:48 -05:00
Here is a list of packages to start with.<br>
2025-10-10 11:51:53 -05:00
`wget -O - https://myrepos.dev/Randy-Jordan/dot/raw/branch/main/.apt_defaults.list | xargs sudo apt-get -y install` <br>
`curl https://myrepos.dev/Randy-Jordan/dot/raw/branch/main/.apt_defaults.list | xargs apt-get -y install` <br>
2025-10-05 18:43:48 -05:00
2025-10-10 11:51:53 -05:00
I also like to change the user shell to zsh.<br>
2025-10-10 12:04:45 -05:00
`chsh -s /usr/bin/zsh username` <br>
2025-10-05 14:15:07 -05:00
Step Six: - [ ] Login as user and setup dotfiles<br>
If you are already tracking your dotfiles and this a fresh install, you can run these commands:<br>
`alias config='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME'` Alias config<br>
`echo ".dot" >> .gitignore` Avoid weird recursion problems where you clone.<br>
`git clone --bare https://github.com/Randy-Jordan/dot.git $HOME/.dot` Clone repo<br>
`alias config='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME'` Current shell scope<br>
You may already have some dotfiles, so we will back them up to avoid conficts.<br>
`mkdir -p .config-backup && \
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
xargs -I{} mv {} .config-backup/{}`
<br>
Now we can run the checkout command to get our dotfiles from the repo.<br>
`config checkout` <br>
Make sure to set untracked files setting.<br>
`config config --local status.showUntrackedFiles no` <br>
2025-10-05 15:23:06 -05:00
Here is a script to automate the above.<br>
2025-10-10 11:51:53 -05:00
`wget -O - https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/dot.sh | bash` <br>
`curl https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/dot.sh | bash` <br>
2025-10-05 15:23:06 -05:00
2025-10-05 14:15:07 -05:00
`config status` To see status of your dotfiles.<br>
`config add .xyzfile` To start adding dotfiles. <br>
## Credits / Resources
[Tom Preston-Werner - README Driven Development ](https://tom.preston-werner.com/2010/08/23/readme-driven-development.html )<br>
[Dotfiles: Best way to store in a bare git repository ](https://www.atlassian.com/git/tutorials/dotfiles )
## License
This project is licensed under GPLv3 - see the [LICENSE ](LICENSE ) file for details.