Live data from Hacker News

Ask HN: Configuration Management for Personal Computer?

news.ycombinator.com

101–110 of 144 posts

Re: Ask HN: Configuration Management for Personal Computer?

#102
post #98
post #88

Earlier quoted context omitted.

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?

Docker tries to solve these problems only on the surface. Nothing in a Dockerfile guarantees reproducability. Try docker build of you favorite Dockerfile today and next week. The images probably won't be the same. Whereas NixOS allows you to build the exact same system now and whenever you want. Although, you'd have to pin the nixpkgs you are using.

Re: Ask HN: Configuration Management for Personal Computer?

#103
when I was running linux (switched to windows lately) I was relying on bash script I made and saved on the github.

It contained everything I need to start working again, such as:

- Installing Ruby/Rails/Python/Django/Node

- Installing and setting up a SQL/Postgres db, creating user etc.

- Installing plugins and configuring Vim

- Installing UI packages for the linux itself (icon packs etc.)

- Installing various libraries (imagemagick etc.) that I know I'm gonna need to install soon

- Creating folder structure I've found comfortable to work with

- Installing various desktop apps I use

Sky is the limit - it was awesome that after fresh install the only thing I had to do was to config git on machine, clone my repo and run one command :)

Re: Ask HN: Configuration Management for Personal Computer?

#104

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…

The Minimalists movement talks about this a lot. The idea is that you pack everything you own into labeled boxes and for 3 months, every time you need X you first think about if you really need X or not, and if you do you unpack. After 3 months you throw out everything that is still packed.

For this reason every few months I start with a clean OS install and for a few days I add what I need, while also taking some time to evaluate other options if needed.

Re: Ask HN: Configuration Management for Personal Computer?

#105

when I was running linux (switched to windows lately) I was relying on bash script I made and saved on the github. It contained everything I need to start working again, such as: - Installing Ruby/Rails/Python/Django/Node - Installing and setting up a SQL/Postgres db, creating user etc. - Installing plugins and configuring Vim - Installing UI packages for the linux itself (icon packs etc.) - Installing various librar…

Background on why you switched back to Windows?

Re: Ask HN: Configuration Management for Personal Computer?

#106
post #2

I used a bash script with homebrew to reimage my MacBook fresh. With cask I can get almost every app I need and reinstate python and necessary packages. As you're working on the command line you can also modify most settings with defaults.write. I'm sure there is something similar you can do with windows and Linux.

I do the same. For me it's as simple as installing ~5 homebrew packages (I can get the same packages for my Linux machines), the Opera browser, and a copy of .bash_profile and .vimrc, which I keep in a Github repo. Having to migrate machines has made me trim down my development toolset significantly. I now know exactly what I need, and can go from fresh machine to the environment I'm accustomed to working with in < 1 hour.

Re: Ask HN: Configuration Management for Personal Computer?

#107
This applies only too MacOS.

I use CCC(Carbon Copy Cloner) to do a full bootable volume backup, which is triggered every night, around 9pm. I go to sleep after 10, so I can switch off my desktop.

When I move to a new machine, I use Setup Assistant or Migration Assistant to migrate data from a CCC backup to a new Mac. [1]

Has worked seamlessly for me across devices as well: :laptops, Mac mini and iMacs.

[1]: https://bombich.com/kb/ccc5/i-want-clone-my-entire-hard-driv...

Re: Ask HN: Configuration Management for Personal Computer?

#108
post #98
post #88

Earlier quoted context omitted.

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?

You don't have to ditch Ubuntu right away. You can install the nix package manager on any Linux distro (and I think also *BSD and MacOS). That way you can play around with it first. You won't get the full power of NixOS but it's a good way to get started.

Re: Ask HN: Configuration Management for Personal Computer?

#109
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 + HomeManager is the best setup for reproducible setups, bar none.

Re: Ask HN: Configuration Management for Personal Computer?

#110
I recently decided to tackle this exact problem, and ended up using Salt in masterless mode to do this. I have the most experience with Salt, and follow a few best practices to ensure my states are idempotent.

Here's my local laptop configuration with a one-step run (I only use Ubuntu laptops as o 2019): https://github.com/AkshatM/configuration

Some challenges and partial solutions I'm still figuring out:

1. Distribution. I cannot simply clone and run onto a new laptop as that assumes I have Git as well as my Git SSH keys for my user integrated - this is usually not the case for fresh laptops. Instead, I carry a clone of this repo in a USB stick, and run `launch.sh` as root.

2. Configuring workspaces. Golang is particularly annoying because $GOPATH != my existing workspace folder (which has many cross-language products in it), so I need to declare two separate workspaces. :/ I would like to one day have a single unified workspace.

3. Version management. I've discovered doing this yourself is detrimental to your sanity (and that apt's package pinning is some of the worst I've ever seen), so I now only require pyenv, nvm, tfswitch, etc. for doing this for languages and favor the latest secure versions of all apt-packages.

4. Deciding which package manager to use. I recently discovered snap, which offers an improved experience for Linux applications compared to apt, but suffers from a small ecosystem. I'm using snap where possible for all my favourite apps, but by and large apt is still the ulcer of my life.

Post reply on HN