Initial commit
This commit is contained in:
85
README.md
Normal file
85
README.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# 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.
|
||||
|
||||
|
||||
Step One: - [ ] Add users and assign passwords and groups <br>
|
||||
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>
|
||||
|
||||
Step Two: - [ ] Removing root login, and copying ssh keys.<br>
|
||||
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>
|
||||
|
||||
|
||||
Step Three: - [ ] Update and upgrade<br>
|
||||
`sudo apt update` <br>
|
||||
`sudo apt upgrade`<br>
|
||||
`sudo apt dist-upgrade`<br>
|
||||
`sudo apt autoremove`<br>
|
||||
`sudo apt clean`<br>
|
||||
|
||||
Step Four: - [ ] Download Packages TODO Add script
|
||||
`sudo apt install`<br>
|
||||
|
||||
Step Five: - [ ] Change defaults <br>
|
||||
I like to change my XDG user directory defaults. Located at `/etc/xdg/`
|
||||
<br> TODO Add link for download and repo.
|
||||
|
||||
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>
|
||||
|
||||
`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.
|
||||
Reference in New Issue
Block a user