Live data from Hacker News

Ask HN: Configuration Management for Personal Computer?

news.ycombinator.com

91–100 of 144 posts

Re: Ask HN: Configuration Management for Personal Computer?

#91
post #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!

Can't stress this enough.

After upgrades, moving computers and installing and configuring everything multiple times, I went the portable route.

Now, for every application I install the portable version is my first preferences. Every few months, I backup application paths and configuration files which are outside of the portable installation paths. Some applications keep local MRU files or some other settings in the dot folders under the user directory.

Of course, the portable applications directory also gets backed up on a regular basis.

Nowadays, a recovery from an operating system failure, results in a downtime of less than an hour.

Re: Ask HN: Configuration Management for Personal Computer?

#92
There is no absolute approach.

On Windows you can use @rlv-dan's strategy though not all apps will be portable.

On Linux it's mostly enough to save your dotfiles incl. .bashrc and your home folder. You can also save your repo lists and the currently installed software and just reinstall these automatically (e.g. with ansible).

But afaik there's no cool and nice solution that you just use. You'll have to write this tool or find your own backup-and-restore strategy.

Re: Ask HN: Configuration Management for Personal Computer?

#93
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 looks quite fascinating.

I'm on Windows for the time being, but will give NixOS a go some time.

For any other WSL users here, it's worth keeping an eye on this issue: https://github.com/NixOS/nixpkgs/issues/30391 (NixOS being packaged up as a WSL distro).

Re: Ask HN: Configuration Management for Personal Computer?

#94

It's a really bad idea to toot ones own horn before the horn is ready but I have (always have had) the same problems. I finally started using Docker with ssh -X so that my host laptop just acts as a X display and the Docker instance is what I "really" work in. The advantage is that I use docker files (dead simple templates) as my configuration - it's there in git right now. I change it when the thing I am doing gets…

I toyed with building a docker workstation, using X forwarding via XQuartz on a macos host. Getting something to play nicely with a high-dpi display and a multi-monitor setup, seemed next to impossible.

It works ok on the one big mac screen :-) just buy larger and larger single displays ! It's what the manufacturers would want you to do :-)

Re: Ask HN: Configuration Management for Personal Computer?

#96
post #7

No need to over complicate things. I just have my ~/.dotfiles and if I remembered I saved a list of installed packages on my old install that I can go through and pick whatever I need. Could add some scripts for the things I know I need to do but that's already adding too much. My feeling is you'll end up working hours and hours to create the perfect setup (which doesn't exist so you just keep tweaking it forever).

If you remember you export the list of packages? That sounds very manual, and prone to failures.

I'm surprised people in this thread aren't talking about backups. I have my dotfiles stored under revision-control, like many others here. I have a couple of notes about the setup of each host I store too. But basically I install Debian packages and that's 99% of the my install.

The only stuff that I install, outside my own code, are things like the ARduino IDE, Firefox, Calibre, and they get installed beneath /opt

Despite the lack of "real" state I still take a backup every day, and that has saved me more than once.

Re: Ask HN: Configuration Management for Personal Computer?

#97
Just yesterday afternoon I picked up my old laptop from 2015, and thanks to NixOS [0] + versioning my home folder [1] in a couple of hours (of mostly waiting for the thing to finish downloading stuff) I had my usual setup running with everything configured - like everything: settings, packages, emacs, shell, wallpapers, etc

NixOS stable is "extremely stable" (i.e. it never broke for me in three years that I use it) and "upgrading it" is still two commands away

Another interesting part is that now that I run it on all machines it is really easy to sync the configuration between machines, as they _literally_ share the same config barring something like 20 custom lines for every machine

This stuff used to take _days_, I'm so happy with this thing

[0]: https://nixos.org/ [1]: https://github.com/f-f/home

Re: Ask HN: Configuration Management for Personal Computer?

#98
post #88
post #86

Earlier quoted context omitted.

> 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 u…

Wow, thanks for the detailed response. Yes it sounds like they've taken great care for reproducibility, which I greatly appreciate.

Sounds very similar to Docker's philosophy, where changes to the system produce incremental changes to the system image and all dependencies are strictly controlled.

What else do I need to be convinced to leave my Ubuntu system for NixOS?

Re: Ask HN: Configuration Management for Personal Computer?

#100
I consider this problem to be similar to moving homes. When you move, you discover a bunch of stuff that you are no longer using and this presents an opportunity to get rid of those things. You also discover things that you have not been using for a while but now that you are reminded, you would like to start using again. In any case, a move can to be a mindful activity that results in a better setup for you in your new home/machine than it is in the current one, and also an opportunity to curate your belongings and restructure/reorganize where necessary. Get rid of cruft, tidy things up, reorganize, and restart!
Post reply on HN