I think the least that distros can do, is allow listing all packages and system settings in config files like .toml rather than having to type in every single package to install, or click through system setting GUIs to setup. Would that require using a whole programming language or system like NIx?

While NixOS works much differently from most distros, that’s the only reason I use it: package and system settings in text files. If I fix something, it’s fixed permanently, I don’t need to hunt down files in random directories if I want to change a setting. If I ever need to reinstall the OS I don’t have to write dnf install every single damn package and manually setup all that up all over again. Having daily-drove Windows macOS & Fedora as throughout the years, my setups have felt hacky as well as houses of cards as I’ve wanted or had to set them up again (I don’t mean Fedora specifically, but distros in general).

Basically it feels insane that it’s the way most linux users and servers in the world operate. If I, a humble computer hobbyist can figure out Nix, why don’t more users do so, and why is Nix so niche?

  • Scoopta@programming.dev
    link
    fedilink
    arrow-up
    6
    ·
    1 day ago

    In contrast to most people here who talk about solutions to this problem with tooling often used for batch deployment what I’ll say is just my opinion on the matter. Outside of OEM or fleet deployments the advantages of nix just aren’t that apparent. You feel like your system was a house of cards but I’ve personally never felt that way and I suspect neither have most other users. Every OS to ever exist more or less behaves in a similar way, i.e. it’s mutable, so most users have only ever known this behavior. Installing software and then having to configure it in a software specific way is the norm across all existing computer platforms for all of time and for most situations it’s worked well enough. It isn’t nearly broken or painful enough for most people to care. Honestly if nix was the norm for Linux it might even scare away windows or Mac users looking to move. Linux is already a learning curve and completely changing the software installation and management paradigm(beyond using a package manager which can conveniently be explained like an app store) would not help the situation.

  • who@feddit.org
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    2 days ago

    Debian’s installer accepts a preseed file that will automate answering the questions it normally asks.

    You can also ask Debian’s package manager for a list of packages marked as manually installed (apt-mark showmanual) and then use it to install those same packages on a fresh system. I think there’s a more formal way to do this as well, but I haven’t needed it in so long that I forgot the details. :P

    As for why most distros don’t consolidate all the configs for all system components in a master text file, I expect the main reason is the Unix heritage: A great many of those components have been around for longer than Linux has existed, or derive from those that have, and their configurations evolved separately. (Almost all of them are configured with text files, though.)

  • Jumuta@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    you don’t need to post the same content on so many channels, everyone’s subscribed to all of them anyway

  • johntash@eviltoast.org
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    There are a lot of options that aren’t nix. Ansible, chef, puppet, salt, etc. Basically any config management solution.

  • Piatro@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    I don’t provision any two devices exactly the same way, and if I did there’s nothing stopping that provisioning script/tool from changing or becoming out of date over time since I’d only run it once every couple of years. I briefly looked at nixos but as another reply said, the major hurdle was the documentation and trying to get “the right way” to do things. I remember flakes being mentioned but being experimental and there being two other things competing as the solution to the same problem and at that point I lost interest. I moved to fedora for the first time in a decade recently and installed what I needed via dnf. It wasn’t a difficult enough process to justify learning another programming language.

  • HayadSont@discuss.online
    link
    fedilink
    arrow-up
    2
    ·
    2 days ago

    Fam, I believe your post is all over the place. Please consider to clarify the following:

    • What is it that you actually desire?
      • Easy installation through a script? Or perhaps through a Kickstart file? Or any of the dozens of other tools used to deploy a fleet of systems?
      • Declarative system management? While perhaps not as powerful as NixOS, the industry has been working with tools like Ansible for over a decade.

    Basically it feels insane that it’s the way most linux users and servers in the world operate.

    Frankly, I somewhat agree. But I believe most people operate within paradigms like “If it ain’t broke, don’t fix it.” and/or “Don’t let perfect be the enemy of good.”. Isn’t “the path of least resistance” what we default to anyways? And if we additionally weigh in sunk cost fallacy, it is no surprise that people are more often than not wed to their ways… Or, at least act upon it.

    If I, a humble computer hobbyist can figure out Nix, why don’t more users do so, and why is Nix so niche?

    I believe NixOS suffers from the following:

    • For the longest time, it really was just niche. Like, NixOS has only fairly recently started to garner a decent audience. Boiling Steam’s chart, while it shouldn’t be used to gauge the user base of each distro, it does help us in finding trendings within a distro. And for NixOS, it clearly shows how it has slowly but surely grown a significant presence from 2020 onwards. Contrast that to Debian or Fedora that have always had a significant presence (or, at least for over a decade).
    • The onboarding experience is absolute horrid. To flake or not? To lix or nixcpp? And I haven’t even mentioned how its documentation is just dog water. Or how over the last year its organization has shown clear growing pains.

    Anyhow, I’m glad to hear you jumped ship to NixOS! Wish me luck when I enter its hostile waters (with the intent to conquer it) this summer 😉!

  • nyan@lemmy.cafe
    cake
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    Gentoo is quite happy to allow you to copy your world file and config files from one system to another, then just issue emerge --emptytree world and take a couple of days’ vacation somewhere while the system rebuilds itself as specified. That’s been an option for as long as I’ve been using it, so at least 20 years. Other than the speed, the only issue is that you have to know where to find all the config files, of which there may be many distributed across /etc and ~ (and maybe other places if you’re really unlucky).

    (Figuring out how to word the emerge command so that it downloads as many binary packages as possible to shorten the wait is left to the interest of the reader.)

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 days ago

    We have some of these things. You can type in dpkg --get-selections to get a list of all packages on a Debian distribution. You can use apt-clone to install or transfer all installed packages to a new system, with a single command. You don’t need to install every package seperately. And Fedora will have a similar concept. I think the package manager also keeps track of some of the config files. You can use dpkg-reconfigure to configure your locale and several other things. These are being used for fully automated rollouts. And I believe other distros have similar tools and package managers. And then we have proper configuration management like johntash said.

    And remember, Linux is an organically grown ecosystem for quite some time now. We have things like the FHS and it’s always the same 3 locations where config files reside. But it’s not a tight ecosystem like iOS and there is no central authority mandating every developer on earth use the same config format and syntax to describe things.

    NixOS on the other hand follows a declarative approach. You’d compare that to Debian configured by Ansible (for example). Not Debian alone. And I mean go ahead and install some software which isn’t packaged yet, and you’ll find out why NixOS isn’t more popular. It’s a nice and clever thing, though. Both the declarative aspect and being immutable. But it comes at a price. And then we have some issues with the implementation and I think the error messages are always very unclear. That’s the two main issues I struggle with. It always requires very advanced programming concepts to do very simple things, and I often need to have a look at the source code to find out what to do. And if the config doesn’t apply, it often provides a very unhelpful trace, sometimes it doesn’t even say which of my config file broke. Earlier this week, I spent almost 2 hours to do something that would have been an “npm install && npm run dev” on a different distro. And that’s why it isn’t very popular. It is very nice, though.