Live data from Hacker News

Ask HN: Configuration Management for Personal Computer?

news.ycombinator.com

81–90 of 144 posts

Re: Ask HN: Configuration Management for Personal Computer?

#81

Most of those tools are built around the "cattle not pets" idea but a PC is a pet. Best way IMO is some dotfiles and a bash script, OS installation part is pretty quick, unless you running arch- but even that can be automated

> Most of those tools are built around the "cattle not pets" idea

That's true, but not in a way which makes them inapplicable elsewhere. They are essential to support the “cattle not pets” approach, but most of them aren't intimately tied to it.

Re: Ask HN: Configuration Management for Personal Computer?

#83
My opinion is that people tend to overdo solutions for problems like these. If you're not faced with some case where you're flashing a laptop on a regular basis, don't aim for 100% coverage on your settings.

1. Figure out what files really aren't easy to replace (eg. vscode config, bashrc, etc.

2. Make a dead simple script that copies all these files/directories (and the script itself) to a temp folder and makes an archive of that folder.

3. Email it to yourself.

4. Make a `/remind me to ....` on Slack or an email service to remind you every few months to do this.

When I do recover, I don't just copy and paste all the files in. I use them as references as I rebuild. Because after a few years, my configs are filled with obsolete cruft or there's better ways to do things and I'll notice it when I go to paste in that segment into the bashrc or whatnot.

This certainly isn't an approach for everyone. Lots of people will want a more nuanced automagical approach. I just often find that over-automation just becomes this expensive headache that never ends up paying for itself.

Re: Ask HN: Configuration Management for Personal Computer?

#84
I do this regularly and decided to, instead of automating things, simplifying and reducing my setup. I have a private cloud that stores documents, all software is in Git repositories. Setting up a new machine is really just copying my private key, setting up cloud access and emails, cloning repositories and copying my nvim config.

Comparing with my colleagues, I have to add that I hardly keep any personal stuff on my machines - I have no photos, music and movies are streamed. I use 128GB of my 512GB storage (including cloud and software). I also try to go with defaults as much as possible.

Re: Ask HN: Configuration Management for Personal Computer?

#86
post #27

NixOS can be helpful here, by making all of the non-user-specific stuff completely reproducible; combine that with Git versioning for dotfiles and a NAS for backups and large storage and your setup should be pretty easy to manage.

> NixOS can be helpful here, by making all of the non-user-specific stuff completely reproducible

How is this different from say Debian's "apt" package manager?

You can specifically reproduce the system by downloading all versions of the packages you have, right?

Re: Ask HN: Configuration Management for Personal Computer?

#87
For the software I use, my approach is portable applications, i.e. applications that require no installation and save their settings in the folder they run from. To move to another computer you simply copy the application folder. Makes it really simple to backup too!

Re: Ask HN: Configuration Management for Personal Computer?

#88
post #86
post #27

NixOS can be helpful here, by making all of the non-user-specific stuff completely reproducible; combine that with Git versioning for dotfiles and a NAS for backups and large storage and your setup should be pretty easy to manage.

> NixOS can be helpful here, by making all of the non-user-specific stuff completely reproducible How is this different from say Debian's "apt" package manager? You can specifically reproduce the system by downloading all versions of the packages you have, right?

Consider reading the NixOS documentation if you would like to learn more, because it’s worth it imo, but no, Debian is a different case.

NixOS doesn’t just manage packages, it manages the entire system holistically. You effectively have a single configuration file (or multiple) that configure every package, service, mount, ramdisk, driver, etc. If I delete everything but my home folder, my configuration file can be used to completely recreate the root and all of its configurations. Have a KVM GPU passthrough? That can be expressed. Want to override bashrc or zshrc globally? Yep. Want to setup users, LDAP, Samba, FTP? Same configuration. It goes as far as to make most files read only so that you can’t accidentally change things.

But it goes further with build reproducibility. All builds are hashed with their inputs. Every package specifies the sha256 sum of their sources. If your package builds on one machine, it shall build on another.

But it keeps going further. NixOS eschews normal shared library paths. Binaries always refer to Nix store paths in their runpath, making sure it will only ever load the version of the library it was built to load.

And there is still more. NixOS tracks generations. Any time you rebuild the system to change a config or add a new package to the root, you get a new generation that can be rolled back. The default bootloader lets you choose what generation to boot. So if you mess up your configuration, you very rarely need recovery media.

It may not seem very important, but it pretty much changes how you interact with your OS. If you want to restart from scratch, just make sure you have copies of your home folder and configs and start over. This is great for switching to LVM or deciding to use LUKS, where it may not be easy to do without reformatting.

It does take investment, but if you have multiple machines it becomes amortized. I’m running 3 machines with largely identical setups.

Re: Ask HN: Configuration Management for Personal Computer?

#89
post #72

I use Ansible for that, since it has great support for Windows and Windows is usually more annoying to configure than Linux (you have to disable telemetry, remove dangerous bloat software, etc). I even have a playbook for setting up a Wintendo machine with the Steam client (big picture mode) replacing Explorer.exe as the shell. If there is interest, I can publish it as open source.

Wintendo?

Presumably a windows-based gaming box, probably in a small-form-factor case with middle-of-the-road hardware.

Re: Ask HN: Configuration Management for Personal Computer?

#90

I was really impressed when I got a new MacBook this year. With my previous Windows machines it was always one or two days of reinstalling everything and then a few more weeks until I had all my settings back. With the Mac I restored from Time Machine and after a few hours I had my machine back pretty much the way it was before with just a few settings missing. That alone is worth a certain premium to me.

I have had Time Machine fail on me when I tried to restore from a backup on the network that was not unmounted properly. It would not let me get to it in any way, and trying to debug the issue from public forums was impossible. In the end I gave up on it as most important files were backed up separately.

Now I'm using Carbon Copy Cloner [0]. It has the same ease of use as Time Machine, it gives you bootable backups and it has the best documentation I have ever come across. Pretty much every possible use case and error case is described with workarounds.

Time Machine is great when it works, but when it doesn't it turns into an absolute nightmare. Also it gives you very little insight into what it is doing or what state it is in.

PS: I'm not affiliated with CCC. Just a very happy user who got bitten by Time Machine too many times.

[0] https://bombich.com/

Post reply on HN