I can "unbloat" Systemd?

I love how this post is being opinion based and a place where sharing related ideas instead a directly solution, also appreciable.Thank you guys! Keep it like that.

2 Likes

Hi, may I ask what type of hardware you want to run NixOS on?

Any actually. But now I have a Intel Celeron and 4GB of RAM, runs very well there.

2 Likes

I still dream of being able to declaratively change my init system on Nixos.

2 Likes

Cool. I ran NixOS on one NAS with a Intel Core Duo 2 CPU, 4GB RAM and SSD as a system disk. It works all fine. `nixos-rebuild` takes bit more time than on newer ones, but I don’t think runtime is nowhere near inverse to CPU performance.

4GB used to be a “workstation” long time ago. It is hilarious how powerful even "“IoT devices” are nowadays. I realized some time ago that my HDDs have 4x cache than my first computer’s HDD was and CPUs have far more L1 cache than what I had RAM on a computer that ran Windows in mid 90s.

Software gets slower faster than …

2 Likes

I use a post-install script that i run after installing Void, which sets up the system related things for me, But it’s obviously not as robust as an actual system like nix is. I suppose it’s the best i can do for now if i want to use something other than systemd. I think i already saw someone else mention in this thread that there is someone working on a project that uses S6 with nix, but i don’t think it’s really usable as a daily driver yet.

Guys. And whay about use Docker in Alpine as base system? There are Docker images based on NixOS? You think I could use a container with XMonad and more Nix packages software over XLibre from Alpine?

To run your whole system? That’d probably a nightmare and you’d have to bind across a lot of things, which because “linux with extra steps”. Using distrobox might make that process easier, though using the final operating system you want is the likely overall answer.

I mean handle the base system with Alpine (Kernel, init, Xlibre) and the most user software with the NixOS container. But possibly I’m just not leaving NixOS.

Ah, that would be a use-case for home-manager. I do that for non-nixos WSL instances since nixos on WSL is a meh experience thanks to not having control over so much like boot.

1 Like

I did not see any mention of these, which you can also try.
Finix seems to be the most daily-drivable systemd-free nixpkgs-based OS. There is also amjoseph/sixos: a nix os without systemd - Codeberg.org as well.

I don’t mean those “small“ projects are bad, but I like more to use the “official one“ (NixOS itself). I love clean things like OpenRC, but the systemd blotware besides is also useful for me: Systemd boot works for me when I’m not doing a multiboot, and if there are things in systemd that actually works and I’ll need to install an alternative to replace it, I prefer what systemd provides. The thing isn’t blow away the entire init system but remove I’ll not use.

2 Likes
   systemd = {

     services = {

       systemd-journal-upload.enable = false;
       systemd-journal-remote.enable = false;
       systemd-journal-gatewayd.enable = false;

       systemd-soft-reboot.enable = false;
       systemd-firstboot.enable = false;

       systemd-localed.enable = false;
       systemd-timedated.enable = false;
       systemd-hostnamed.enable = false;
       systemd-networkd.enable = false;
       systemd-homed.enable = false;
       systemd-rfkill.enable = false;
       systemd-udev-settle.enable = false;

     };

     coredump.enable = false;

   };

I got the difference of 10MB in RAM, well at least is notable xd. In the practice it doesn’t worth but I’m felling “unbloated“ haha. I could mark it as solved since I’m seeing it doesn’t will go more further but I don’t want close it for other people, what you say? Anyways, thank you guys.

2 Likes

I doubt your 10MB measurement.

The only thing your config should have actually done in practice is disable the coredump daemon. Most of the other stuff is either already off by default or socket-activated and should never run unless you’re doing something weird (and the binaries are still included in the nix store anyway because you didn’t override the systemd package, which is how you should disable them). This is almost certainly not 10MB.

Actually, now that I think about it, even the coredump daemon is socket-activated, so this shouldn’t have any effect on memory use unless you’re seeing coredumps.

You’re also not disabling the one thing that would actually make sense to replace with systemd-timesyncd.

But hey, if it works for you…

5 Likes

The better thing I can do is use Nix in other distro, with nix-shell, nix-gc and repl I’m happy. The whole system definition is great, but everything has its cons and pros. Maybe I’m switching to Artix guys.

1 Like

I tried artix (dinit) with nix and damn, it was nice. I wanted the whole c++ combo :laughing: