Suggestion: NixOS with sysvinit

Hi,

I’ve just heard about Nix & NixOS.

The package management Nix seem awesome !

I wanted to test then NixOS but I see it’s only under systemd , so I can’t…

The common criticisms of systemd is that it departs from traditional Unix/Linux principles and practices.

  • Monolithic design: Systemd is a large, complex piece of software that combines many system management functions, rather than having separate, specialized tools as in the traditional Unix philosophy.

  • Proprietary configuration format: Systemd uses its own configuration file format (.service, .socket, etc.) rather than traditional plaintext configuration files.

  • Tight integration: Systemd is deeply integrated with the kernel and other core system components, rather than maintaining a more modular, loosely-coupled architecture.

  • Complexity: The systemd codebase is very large and feature-rich, which some see as unnecessary complexity compared to simpler init systems like SysV init or BSD init.

  • Departure from Unix principles: Systemd is seen by some as moving away from the Unix philosophy of “do one thing and do it well” in favor of a more centralized, opinionated system management approach.

Do you have any plan to support sysvinit ?

Cheers.

There are a few community projects to try to do NixOS with a different init system, but none of them have really reached a usable level of maturity for most cases.

The reality is that if you remove systemd, it’s basically a brand new OS, and you have to rewrite most of the modules and find replacements for all the functionality that systemd provides. The upside is very small, which I suspect is why no one has been able to get it across the finish line.

11 Likes

The reality is that if you remove systemd, it’s basically a brand new OS, and you have to rewrite most of the modules and find replacements for all the functionality that systemd provides.

Indeed it’s a big job, too bad NixOS started with systemd :confused:

SystemVinit & Nix are the way to go and merge them will give a awesome distro…
.:pray: :pray: :pray:

These are all theoretical points. Give me concrete examples why systemd is bad. Yes it is complex but the job it performs is complex too. If you need to fly a plane, you don’t complain about why the cockpit has a lot of buttons.

3 Likes

I don’t want to start a debate systemd Vs sysvinit, they are enough documentation and new distro that come back to sysvinit with supporting documentation why so…

I would argue this is backwards. systemd has enabled NixOS to do a lot of things that would have been much more work with something else. NixOS is already an awesome distro, and it’s not clear that it would have become one if it hadn’t leveraged systemd.

5 Likes

The answer is «yes», it used upstart for years.

They have intentionally broken POSIX-mandated nohup. They changed defaults and configuration methods for on-lid-closed behaviour. And then I migrated off NixOS because why bother (I also wanted some convenience stuff reliant on root being able to control the VTs to keep working).


Anyway, when I migrated from NixOS to systemd-not-running Nix-managed installation, it was easier to figure out generation of bootscripts from scratch than figure out anything non-standard there with NixOS. And contrary to what people might say, the value of the modules is in config file generation and you can reuse this functionality outside NixOS if you wish. I do this sometimes lang-os/use-from-nixos.nix at bd9bf5e1062da140e6257e2fa5b89f3bad83b503 · 7c6f434c/lang-os · GitHub . You don’t really need the topmost part of NixOS for anything, if you are the one running all the machines you want to cover.

1 Like

Monolithic design: Systemd is a large, complex piece of software that combines many system management functions, rather than having separate, specialized tools as in the traditional Unix philosophy.

It’s a large, complex project, but it’s not a single large piece of software: it’s a lot of components that work well together. Yes, it includes some useless crap (like hostnamed), but it’s not that you have to buy into all of them at once or not use systemd. For example, I don’t use networkd, nor resolved and neither oomd, yet my system is working perfectly fine.

Proprietary configuration format: Systemd uses its own configuration file format (.service, .socket, etc.) rather than traditional plaintext configuration files.

Have you ever opened one? You would have learnt they’re text files with this super-proprietary and complicated format:

[Section]
Property=Value

Departure from Unix principles: Systemd is seen by some as moving away from the Unix philosophy of “do one thing and do it well” in favor of a more centralized, opinionated system management approach.

NixOS is the apotheosis of the centralised (single configuration file for an entire system) and opinionated (a single configuration language, forcing every software to be built, linked and configured in the same way, breaking software not built for NixOS by default, …) approach to systemd management. NixOS even completely subverts the Filesystem Hierarchy Standard (FHS) to achieve reproducibility and atomic updates.

I’m not sure how you could possibly like NixOS if it weren’t for systemd.

Complexity: The systemd codebase is very large and feature-rich, which some see as unnecessary complexity compared to simpler init systems like SysV init or BSD init.

It’s complex because it does a lot more that just initialising the system. Some of the things it does it does quite poorly (for example, the journal file format objectively sucks compared even to plain old text log with rotation), but some are pretty good and are used extensively to make what NixOS is today (declarative configuration for services, mounting filesystems, ordering services dynamically after devices, dynamic user IDs and GIDs, ephemeral services, security hardening, container management…)

Tight integration: Systemd is deeply integrated with the kernel and other core system components, rather than maintaining a more modular, loosely-coupled architecture.

It’s developed for and targeting a typical GNU/Linux desktop or server, yes. I don’t see what’s bad about it. It would cool if you could use it on some BSD or tiny embedded system, but I wouldn’t run NixOS on those anyway.

I guess I just defended systemd. I didn’t think it would have ever happen, but most of these points are so ludicrous I had to.

16 Likes

This comes up every few months. It’d be more productive to look at the existing threads than rehash the same things in a new thread. And if you want to contribute to such projects, you’re welcome to, but it seems very few have been willing to put time towards such an effort.

Also, starting off this thread with quoting ChatGPT is hardly a useful way to start a conversation, IMHO. Surely we have enough bot posters online…

14 Likes

The systemd unit format is nothing more than a variant of the FreeDesktop-standard Desktop Entry format (aka .desktop), which is on itself one of the many variants of the venerable INI format.

2 Likes

This topic was automatically closed after 11 hours. New replies are no longer allowed.