Rewrite dotfiles so it's up to date
This commit is contained in:
parent
7221790c09
commit
1e9c5aae76
1 changed files with 7 additions and 12 deletions
|
@ -4,19 +4,14 @@ repo: RealOrangeOne/dotfiles
|
|||
tags: [arch, linux]
|
||||
---
|
||||
|
||||
### What are dotfiles?
|
||||
Dotfiles are a way for people to store settings and preferences to make setting up a new computer that much easier. I use both my laptop, desktop and work machine almost every day, and want them to be setup in an almost identical way.
|
||||
[Dotfiles](https://wiki.archlinux.org/index.php/Dotfiles) are a way for people to store settings and preferences to make setting up a new computer that much easier. I use both my laptop, desktop and work machine almost every day, and want them to be setup in an almost identical way.
|
||||
|
||||
Most people I've seen store their dotfiles on GitHub. This is a great solution as it's possible to add authentication before accessing them, and stores a complete version history. This solution doesn't really work for me, having to run `git pull` is just too much effort to update files!
|
||||
Most people store their dotfiles in version control. This is a great solution as it's possible to add authentication before accessing them, and stores a complete version history.
|
||||
|
||||
## How I did it
|
||||
I used my nextcloud server to sync all my dotfiles between my devices, and then used symlinks to split out some of the files into the right locations. This means that changes can be updated live between machines
|
||||
## My Dotfiles
|
||||
[My Dotfiles](https://github.com/RealOrangeOne/dotfiles) are built using [puppet](https://puppet.com/), which is designed to allow fast setup of servers from declarative configuration. This is fairly overkill for what I'm using it for, but it works really nicely, and supports everything I could possibly need.
|
||||
|
||||
This worked brilliantly, config files were automatically synced as soon as I made a change, just as soon as they connected to a network.
|
||||
I synchronise these files with git, and publish them [on GitHub](https://github.com/RealOrangeOne/dotfiles).
|
||||
|
||||
After I got this all setup, I started committing the files to my GitHub too, so they could be publicly accessibly. I had to use the `.gitignore` to stop some parts being public like SSH config, but the rest is completely open!
|
||||
|
||||
### Atom
|
||||
The main problem was with atom packages, I had to manually store what packages were installed, then manually install them on the other machine from the saved file. This was made easier by `apm` allowing me to list them and automatically save it to a file, but it wasn't perfect.
|
||||
|
||||
Eventually, after looking into possible solutions, I came across the [`Sync settings`](https://atom.io/packages/sync-settings) package, which was the answer to my prayers! It saved all my config data for atom into [a gist](https://gist.github.com/RealOrangeOne/9f9a4dd799ad01aa0502a09f06cbf454/), which I could then backup and restore too from within the application. It also warned me when my local data was out of date from the remote, and prompt me to download the updated data.
|
||||
### Private data
|
||||
Things like SSH config and private environment variables can't go onto GitHub, for obvious reasons. For this, I use my [nextcloud](https://nextcloud.com/) server to sync a private directory to my machines, and depend on those files in the puppet config.
|
||||
|
|
Loading…
Reference in a new issue