Restructuring NixOS to work without systemd? e.g., with SysVinit

I agree that systemd isn’t really ideal for the embedded case. What would really be awesome in these space constrained situations is a file system that is aware of network focused dedupping algorithms like casync. Just found this issue, for example.

Would go long way to save space in constained environments, but it would also open the door for us to use this on the remote cache end to make the network traffic more efficient in general.

The current implementation of the module system in NixOS is also probably too heavy for these cases, but something like RFC 22 could help that in the future.

3 Likes

I know of at least one case where something similar is in production. A friend of mine is working in a new-space startup that uses Alpine + nix on their satellite. Basically, NixOS was too heavy for them and they had trouble with some proprietary binary drivers. As far as I understand, they now build a base image on Alpine with the proprietary stuff, add a single-user install of nix on top of that and then use that to manage dependencies and updates to the majority of their firmware. They can roll back all the critical parts of the firmware as desired, and the base image doesn’t need to be updated in space, so they just leave that alone, making all firmware updates as risk-free as they would be on full-blown NixOS.

I think until something like a minimal embedded-friendly version of NixOS exists, this will be the way to go for embedded.

8 Likes

About that…

I kid, cool to hear an anecdote about practical use of nix in the embedded space.

Since this thread started https://www.liminix.org/ has also come into existence, which might be of interest.

1 Like

Ehhh… do you know about Not-OS?

4 Likes

For work I’ve made a custom embedded OS using nix which is probably not too different than Not-OS. We now need better networking capabilities so I am experimenting with switching from runit to systemd (for networkd in particular).

Also, prior to this need I have continuously struggled with packages bringing in systemd as a dependency. They usually have switches to disable the dependency, but hunting all that down has been a pain. I’ve had cases where a package did not depend on systemd, but after an update suddenly started depending on systemd and then I would have to go figure it out. I am looking forward to not having to do that anymore after this systemd integration.

1 Like

There’s a new RFC on this!

https://github.com/NixOS/rfcs/pull/163

5 Likes

Nice. I know this has been controversial due to the systemd, anti-systemd debate, but a service layer can really help us generalize the ecosystem outside of Linux (BSD, MacOs, etc), not to mention help out where systemd isn’t needed or wanted.

3 Likes

did i just read that right? Nix is in SPACE now!

This is big news! :-)…

Do you have any more details of this project…

Nix has arrived , in space!

1 Like

It might have been this, which I thought was incredibly cool: NixCon2023 Nix in Space

2 Likes

ok thanks @TLATER , i’m still sifting through all the nixcon talks…

There a lot of things going on… It’s quite hard to keep up. interesting stuff.

Jup, that’s the one. The company is called OroraTech, they do wildfire detection with satellites. The longer talk from Nixcon 2022 might also be interesting: https://www.youtube.com/watch?v=RL2xuhU9Nhk

3 Likes

I don’t think it’s weird at all, I mean, Artix is just Arch without systemD, but it’s still a different distro