Ask HN: What are you all using to automate desktop setup and config?
So, as seems to happen a couple of times a year, I'm faced with installing (in my case Ubuntu) GNU/Linux on an x86 machine for personal use.
Then I'll have to go through and do all the things I always do:
* Install a bunch of packages: net-tools, vlc, sshfs, and like 30 others
* Install Steam and Discord
* Install browser extensions
* Set some config options
* Pair with my bluetooth devices
...and on and on.
What is everyone using in 2019 to automate some or all of these tasks?
18 comments
[ 3.8 ms ] story [ 59.0 ms ] threadSince a few hours has passed and nobody has anything, I'm kinda assuming that nothing so great really exists. Maybe just write a shell script? Hard to test obviously.
Maybe Ansible?
If this post doesn't get traction, try https://reddit.com/r/sysadmin There's some discussion on this topic there: https://www.reddit.com/r/sysadmin/comments/7j1o1g/recommenda...
I’ve found that I do this infrequently enough that the cost of doing writing and testing code to automate it isn’t worth it.
I’ve found that others do this infrequently enough and with enough variation of preferences that there isn’t a framework which is sufficiently well-documented to reduce the above cost.
Documentation and tests could be better, admittedly, but there's just not enough time in the day. I'd be keen to get input from others though, and I'd be happy to target specific areas of documentation that they find lacking...
I’ve had enough Ansible pain for multiple lifetimes. I might use Chef, but certainly not Ansible.
In the context of OPs question, you might also want to mention home-manager ( https://github.com/rycee/home-manager )
If you don't mind me blowing my own horn: I wrote this project that started off as a way to let me re-install new development machines with a single command, 'freckles' ( https://freckles.io ).
It uses Ansible under the hood, but configuration is simpler, all you'd need is a single text file containing something like:
Choosing pre-made tasks from: https://freckles.io/frecklets/default or create your own (for example, there is none for installing steam currently, but I'm happy to add those over time when users request them -- the nice thing is those only need to be written once).Then execute the thing with:
It's smart enough to figure out whether it needs to ask for root and such. It needs (and autoinstalls if required) a minimal Python and rsync on the target machine, and it creates and installs some other helper tools into $HOME/.local/share/freckles, but that can be deleted after a run if necessary.There's quite a bit more to it, but that'd be the simplest way to use it. The main thing really is that you can keep your machine specific configuration in a single, easy-to-read and -create file, and you only need one single command to apply it to your machine.
EDIT: anybody know how to format code blocks on here so they render on mobile properly?
It's open source too: https://github.com/fastily/autobots
sudo apt install [all the packages I want]
I'm usually working 100% in the terminal (raspi, VPS, WSL, etc), and the defaults are fine.