I like the idea of nixOS and will definitely try it in the future to see how portable I can make the setup be (hopefully a couple of files that can configure the entire machine).

But the only thing in my mind that is stopping it not being the absolute almost perfection of a tech-savy distro is the reliance of systemd, which has software that I as a user will never going to touch which adds unnecessary bloat to the init (also more unnecessary attack vectors). And if I really needed to have some of the systemd programs, there are replacements out there that do the job that can be later installed when needed, like having log files and stuff.

What do you think of some day seeing a fork of nixOS that uses other init systems and works well? Or is it just me that likes this idea? Like a voidish nixOS 🤔

  • Chinstrap@lemmy.ml
    link
    fedilink
    English
    arrow-up
    31
    ·
    5 months ago

    If you manage to infect your systemd unit list which requires root privilege and give it a permission to run on boot I don’t think it’s an attack vector anymore its one’s stupidity. Systemd is the furthest thing from an outside attack. Someone might poison your bashrc and its more possible than someone inserting a malicious unit file and asking you to run.

    • BlanK0@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      10
      ·
      5 months ago

      I didn’t know about bashrc poisoning, thx for the intel.

      You are probably right, systemd attack vector might not be that big as it seems. But its a bit unfortunate that it has that small extra negative layer of security.

      • palebluethought@lemmy.world
        link
        fedilink
        English
        arrow-up
        13
        ·
        edit-2
        5 months ago

        The bashrc poisoning thing was sarcastic. the point is it’s not important as an attack vector because if that’s even part of your surface area, then the attacker is already pretty well into your system

  • Vilian@lemmy.ca
    link
    fedilink
    arrow-up
    20
    ·
    5 months ago

    the init is just a binary, the others systemd features are different programs from different binary, and you are not forced to use them, you can use only the init and don’t use the others, it’s not gonna affect security, systemd init is the most tested one

    and you can’t, a lot of technology that make NixOS and others immutable distros works exists only because of systemd

    and if others init system worked as well, the entire of the linux community would not have changed voluntarily nor indenpendently to it

    What do you think of some day seeing a fork of nixOS that uses other init systems and works well? Or is it just me that likes this idea?

    doubt, is too much work just to make a systemd alternative, without the reliability and support that systemd have, but i think it could be a fun hack

    • nyan@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      3
      ·
      5 months ago

      To set the record straight, since you apparently have no idea of the history: systemd isn’t the original Linux init system, and wasn’t foisted on the Linux community because it was technically superior for most people’s use cases. It still isn’t the only viable Linux init system, but it pulled a Microsoftian embrace-extend-extinguish on udev, which makes it more difficult to switch away. Its current popularity is still not based on technical merits. Instead, it’s political, because most people don’t care about what init they’re using and most distro-makers take the path of least resistance.

      It’s true that you’re not required to use all of the individual executables that comprise systemd, but most distros will require you to install them. So they’re still present as unwanted clutter, and bugs could still pose a security risk if an attacker can run the executables. (This doesn’t mean that OpenRC or runit would necessarily be any more secure—every non-trivial piece of software has bugs, and some percentage of those are going to be security-relevant. You’re not required to care about small amounts of on-disk clutter, either, but some people choose to make their system partitions small and micromanage the contents even if they’re not working on embedded.)

      Compiling your own copy of systemd without the clutter, judging from the contents of the systemd ebuild, requires setting more than 30 compiler options. And then installing the result manually without trashing your system. Not trivial, in other words.

      If systemd works for you, then by all means use it, but accept that other people may choose to install something different on their own machines for what you consider to be bad reasons, or no reason at all, and arguing about it just annoys them without providing any benefit to you.

  • Lupec@lemm.ee
    link
    fedilink
    arrow-up
    17
    ·
    5 months ago

    My understanding as a NixOS user is a lot of its fundamentals are very strongly coupled to systemd. It’s responsible for things like running system activation scripts and managing any services it exposes options to, so replacing it sounds like a tall order.

    I’m not aware of any Nix-based alternatives, but I’d definitely welcome them! Oh and also, as others have pointed out, Guix might fit the bill depending on your needs.

    • BlanK0@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      5 months ago

      GNU Guix, definitely going to check out! I think also most of the packages I have are foss, for non-foss I have flatpak anyway 🤔👍

  • YIj54yALOJxEsY20eU@lemm.ee
    link
    fedilink
    arrow-up
    4
    ·
    5 months ago

    Does Void linux come with a way to handle systemd service files? I’m curious how people do it when so many packages require a daemon running.

    • BlanK0@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      5 months ago

      For daemons, its simply symlinking the services in the ‘sv’ folder to the var/services, it should be running after that.

      Not sure how compatibility with systemd apps work on other inits but for what I know the packages that are shipped focus on specifically the init system that you are running (from whatever repo you use to install on the distro, for example artix has other inits besides runit).

      Edit: Also you have the ‘sv’ command on runit that acts exactly like systemctl. You can stop, start and all that stuff

      • z3rOR0ne@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        5 months ago

        You need to take a look at Artix Linux first before considering this. They offer four different init systems, including runit, s6, dinit, and openrc. The Artix devs have done a lot of work creating service scripts that interact with many common packages. They also have done integrated eudev and have created an elogind alternative called seatd in a push to remove systemd from their distro.

        I’m not on NixOS (I use Artix with runit), but imho if you’re going to take on creating another systemd-less distro, Artix is the one to take inspiration from. They simply have done it better than the others (Devuan, Void) imho.

        I personally would be interested in seeing a NixOS fork without systemd, solely because it sounds intriguing. But I’ll admit it sounds like it would be a pain to maintain.

      • melroy@kbin.melroy.org
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

        I’m going to move to Void Linux soon as well! I’m very excited.

        But I did saw this simple ln -s (symlink) between the /etc/sv folder and /var/services. But who is maintaining / creating those runit files? The Void community? What if something is indeed missing?