Hacker News new | ask | show | jobs
by kesor 27 days ago
Instead of re-inventing Linux distributions for FlipperOS on top of Debian. They should just choose to base it on NixOS which already has these "profiles" as a built-in feature called "Specializations" https://wiki.nixos.org/wiki/Specialisation
6 comments

I have a couple NixOS machines but I never put "just" and "NixOS" in the same sentence.
I strongly disagree here. On the technical side, I'm sure it works, I almost never hear about Nix not working.

On the practical side, "learn Nix" is a _massive_ onboarding task. Without Nix, I'd probably pick one up assuming I'll find something to do with it. With Nix, I'd wait until I have a project I know is worth figuring out Nix.

If this were my project, I'd probably go with the absolute most simple answer: multiple SD card readers. Install the base OS on one card, allow hot-swapping the other card, do some mount point stuff with the other card (like maybe it auto-mounts to /usr/local, and have packages install into /usr/local). Or maybe some kind of overlayfs with the other card. SD cards are cheap, and I'd rather glue an SD card holder to the back of a Flipper than learn Nix.

It is just a Linux device. Other people will install NixOS on it anyway, and use specializations if the whole idea of swapping device roles in-and-out is viable. I don't really understand why would the team that already got a full plate decide to also invent a whole new Linux system while they're creating their hardware device.
People that want NixOS should absolutely be free to install it, I just think making it the default makes the system dead on arrival. There are hordes of people using Arduino's editor on esp32 boards because they don't want to learn esp-idf (not a judgement, Arduino works fine enough for most uses).

> I don't really understand why would the team that already got a full plate decide to also invent a whole new Linux system while they're creating their hardware device.

Honestly, I just wouldn't solve that. Nix makes the product way harder to sell, and home-building a solution is either a) an entire product all by itself, or b) shitty, in the "it only works on very specific happy paths" sense.

I also frankly just don't think it's a feature worth as much to consumers as it costs to make. At worst, it's a minor inconvenience to reflash a Pi card. If I'm really lazy, I just disable systemd services for whatever was on it and layer the new stuff on top. It's like 5 commands to get it back to "close enough to fresh".

I had the same thought. Their stated goals are very much in line with what nix is all about.

Sadly, I totally get why they didn't. The nix way still isn't ready for "hey everybody, I'm making a thing, let's work on it together."

The hurdles are just too high for non-nix-nerds to pick it up while simultaneously trying to learn the underlying project.

It's a better way, currently only for those primarily in search of a better way.

They already tried it and got so much pain that they decided on an easier way.
Really? I'd love to see a link (not being facetious)
I daily drive nixos and I have no idea what specializations are and reading that wiki article didn't help. Am I just looking at a way to drop in chunks of predefined config?
It is a way to switch into a different configs. Just like when you switch to a new set of packages when you update your channels (or flake) and you get activated with the new versions. Same thing with specializations, just you can choose to have a different set of packages activated and enabled in each different specialization. Like having multiple different configs in one.
Oh, like docker compose --profile (loosely). Is that useful here? I'd think they would just make a flake/module that adds Flipper stuff and include that to the initial config.
It depends how much of that is services. If the device is hardware constrained, having an option to boot into a different set of services can be useful. Like a way to have more than a single lean thing, instead of a single bloated one.
I came here to say this, too.