Child pages
  • Welcome to the Wiki of aseith.com
Skip to end of metadata
Go to start of metadata

Welcome!

Hey there, my name is Alex and this is my Wiki. From everything Unix (Linux/Solaris) related, to app projects and home automation, that's just a small list that I'm having fun with.

Feel free to browse my blog posts (on the right), or any of the Wiki articles below. You can also browse via space links on the left.

Let me know what you think, I really appreciate your feedback. Ping me on Twitter, if you like: @_aseith

Latest wiki updates

Eine virsh console Sitzung kann mit einem deutschen Tastaturlayout auf einem Mac im Terminal genauso beendet werden, wie eine telnet Sitzung:

ctrl+alt+6

So, und jetzt geht's endlich nicht mehr vergessen (smile)

The problem

You want to preserve your dotfiles for the future, and most likely also want to distribute them among different machines and accounts, but keeping them in sync as well. For this, nowadays it's common practice to manage your dotfiles in a git (or some other) version control system.

Now, in the beginning it may be easy to simply push some .'s to your simple git repository. As your dotfiles grow, there may come the time, that you want to differentiate them a little bit, like having a gitconfig for work and for your private git fun. Now things can start to get more complex from this point, as this scenario for example requires you to have either multiple gitconfigs with some duplicated lines, or use some 'fancy' script with some if-else-logic to include/exclude certain lines.

The solution - dots, the dotfiles management utility

dots fixes this issue through the following features:

  • Configuration groups
    When installing your dotfiles onto a new machine, dots offers you the ability to select a specific 'group' of dotfiles that you would like to have installed into that environment. By organizing dotfiles into logical groups (such as 'machine' groups) it's possible to only install the dotfiles that are required by that environment.
  • Cascading file structure
    By selecting multiple configuration groups there is the possibility that two groups both contain a dotfile with matching names. For example, if two configuration groups both contain a bashrc file then the dots utility will automatically merge these two files together. A special syntax is also offered to allow for one file to override another or for the cascading files to be merged into the files at specific points.
  • Installation time includes
    Some configuration file formats do not support a way to natively 'include' other configuration files into them. The dots utility allows for files to be inserted into a specific configuration file using a special include syntax (Known as "explict named append points"). The included file will also follow the cascading file structure previously mentioned.
  • Follows XDG Base Directory Standard
    The XDG Base Directory Standard specifies that all configuration files should be located in the $XDG_CONFIG_HOME directory. By default, this is where all configuration files and directories will be installed. While this does require a little extra work to ensure all programs read their configuration files from here it offers a much more organized view of user dotfiles.

Getting started

First of all, we clone the dots repository from Github:

cd ~ && git clone https://github.com/EvanPurkhiser/dots-template dotfiles

After that, you should create your own dotfiles repository on Github (or some other git hosting website). I created mine on Github and named it 'dotfiles'. It is wise to change the remote repository, where all your changes shall be pushed to your newly created dotfiles repo. You can do it like so:

git remote add upstream git@github.com:YOURUSER/dotfiles.git

This has the advantage that you can still fetch updates from the original 'dots-template' repository like this:

git pull origin master

while still pushing & pulling on your own repo as you're probably familiar with.

Now starts the real fun. First of all, you should edit the README.md and push it back to your repo:

git add README.md
git commit -m "From template to personal readme"
git push -u upstream master

After that, you probably want to add some dotfiles to your dotfiles repository.

Adding your bin's

The most easiest task is probably adding your personal bins to the repository. All binaries that shall be available on all machines can be placed in the base directory:

cp -r ~/bin ~/dotfiles/base

Then commit with git, of course:

cd ~/dotfiles && git add . && git commit -m "Added public bins"

Cascading gitconfig

to be continued...

Just a short note how to validate that the issued Certificate, the CSR (Certificate Request) and the corresponding Private Key all match using OpenSSL:

First, we pull out the md5 hash of the issued certificate modulus:

openssl x509 -noout -modulus -in aseith.com.crt | openssl md5
d56e4ef0a3577702c7878afe1d4d5a4e

Now the CSR:

openssl req -noout -modulus -in aseith.com.csr | openssl md5
d56e4ef0a3577702c7878afe1d4d5a4e

And the Private Key:

openssl rsa -noout -modulus -in aseith.com.key | openssl md5 
d56e4ef0a3577702c7878afe1d4d5a4e

As you can see, they match. Phew (smile) 

Now that you validated that everything matches, it's safe to secure your Webserver with SSL/TLS without issues.

  • No labels
Write a comment…