Being a Linux newbie that idea did not even cross my mind. MIND BLOWN. In all seriousness, though, are there ever user secrets in ~/.config? It seems like a crazy & genius idea at the same time.
There can be secrets in .config and so you need to be deliberate about what you commit while also ensuring that your .gitignore file is properly filled out to exclude the files which would have secrets that you don’t want to be portable. This requires a bit of work and you will, in the process, learn about how every single application that you use stores its config. You typically don’t want to just git add ., though this is a lazy/simple option and can be acceptable if you keep your files and backups secured.
This kind of configuration will also encourage you to not just hit the ‘install plasma-apps metapackage’ button and be more deliberate about the software that you install as you will need to individually address the .config files for each application in your settings repo.
I’d recommend against using Github. First, remember that “the cloud” is just “someone else’s computer”. Trusting anybody (esp. Microsoft) with critical data is a bad idea. So, sync to a location where you create your good, secure primary backups. The kind you put on a disk in a safe deposit box.
This is undoubtedly more work than simply re-configuring everything when you fresh install. The payoff is that your system’s configuration will be portable and as consistent as possible across all environments and you can safely try new configurations with the trust that you can use git to revert any changes in case you don’t like them/it breaks something.
If you want to do even more work you can maintain a separate set of dotfiles for your desktop machines and the machines where you only interact via terminal. Things like tmux config/plugins, bash/zshrc files, useful scripts and the contents of .local/bin (which is where your user’s executable scripts primarily reside) so you can ensure that your remote environments are consistent and equably capable.
For more reading/search/youtubing on the topic, these kinds of repos are commonly referred to as ‘dotfiles’ or ‘dots’. You will often find people who customize applications that share their dots (more common in the ricing community). Some projects are essentially glorified dotfiles (NVChad for nvim, for example).
Additionally, if you have more complicated setups that need to drop files into system directories or just in multiple unrelated directories, you can add GNU Stow which basically lets you store all of your dotfiles, binaries, system configurations, etc in a single directory (which you make a git repo) and you configure GNU Stow with the locations where these files need to live and it puts the files there, via symlink with a single command. Stow is an added level of complexity, likely more than most people need, but if you interact with a lot of new machines and need a quick way to configure them all in as much depth as possible… this is one of the ways you can do it.
*Install OS for the first time ever*
*commit changes, push to repo x100000*
Being a Linux newbie that idea did not even cross my mind. MIND BLOWN. In all seriousness, though, are there ever user secrets in ~/.config? It seems like a crazy & genius idea at the same time.
(I keep them in two Restic backups)
Welcome Linux newbie :)
There can be secrets in .config and so you need to be deliberate about what you commit while also ensuring that your .gitignore file is properly filled out to exclude the files which would have secrets that you don’t want to be portable. This requires a bit of work and you will, in the process, learn about how every single application that you use stores its config. You typically don’t want to just
git add ., though this is a lazy/simple option and can be acceptable if you keep your files and backups secured.This kind of configuration will also encourage you to not just hit the ‘install plasma-apps metapackage’ button and be more deliberate about the software that you install as you will need to individually address the .config files for each application in your settings repo.
I’d recommend against using Github. First, remember that “the cloud” is just “someone else’s computer”. Trusting anybody (esp. Microsoft) with critical data is a bad idea. So, sync to a location where you create your good, secure primary backups. The kind you put on a disk in a safe deposit box.
This is undoubtedly more work than simply re-configuring everything when you fresh install. The payoff is that your system’s configuration will be portable and as consistent as possible across all environments and you can safely try new configurations with the trust that you can use git to revert any changes in case you don’t like them/it breaks something.
If you want to do even more work you can maintain a separate set of dotfiles for your desktop machines and the machines where you only interact via terminal. Things like tmux config/plugins, bash/zshrc files, useful scripts and the contents of .local/bin (which is where your user’s executable scripts primarily reside) so you can ensure that your remote environments are consistent and equably capable.
For more reading/search/youtubing on the topic, these kinds of repos are commonly referred to as ‘dotfiles’ or ‘dots’. You will often find people who customize applications that share their dots (more common in the ricing community). Some projects are essentially glorified dotfiles (NVChad for nvim, for example).
Additionally, if you have more complicated setups that need to drop files into system directories or just in multiple unrelated directories, you can add GNU Stow which basically lets you store all of your dotfiles, binaries, system configurations, etc in a single directory (which you make a git repo) and you configure GNU Stow with the locations where these files need to live and it puts the files there, via symlink with a single command. Stow is an added level of complexity, likely more than most people need, but if you interact with a lot of new machines and need a quick way to configure them all in as much depth as possible… this is one of the ways you can do it.
Thanks for typing all this up
Thanks for the extensive explanation. I was almost certain you were joking about using Git for that purpose but it seems you are being serious :)
I will stick to my Restic backups for now. :)