Permanently Deleted

      • PorkrollPosadist [he/him, they/them]
        ·
        1 year ago

        It refers to Declarative Programming. Specifically, this means there is no state and no flow of control. This is different from most programming / scripting, where tasks are accomplished by performing a series of tasks sequentially and making conditional branches based on state (i.e. values stored in memory). When you declare a variable in Nix / any functional programming language, its value cannot be changed arbitrarily, and therefore it does not introduce state. When you don't have any state involved, functions can be evaluated in any order - or in parallel - without one needing to wait for the result of another. They will also always produce the same result when given the same input. sin(30) will always equal 0.5 no matter what equation you plug it into.

      • OliCromwellOfficial [he/him]
        ·
        1 year ago

        Your configuration describes what your system should look like, NixOS then makes changes to pull the computer in line with that description

        Rather than many different configuration files for different tools you may use that use their own formats

          • combat_brandonism [they/them]
            ·
            1 year ago

            PorkrollPosadist nailed it, but if you need another framing it helped me to think of NixOS as learning an entirely different OS as opposed to trying out a new distro. That declarative config is an abstraction of the underlying unix OS and the software available for it, and a lot of the techniques you know for managing a unix system don't work on that abstraction.

            The learning curve is painful but so worth it for desktop portability or managing your homelab.

          • PorkrollPosadist [he/him, they/them]
            ·
            edit-2
            1 year ago

            Yes. It also means that if you are trying to set up a complex piece of software on Nix (let's say PostgreSQL for example), you have to cross-reference the upstream manuals with the Nix documentation, and sometimes dig into the Nix package declarations themselves to figure out what on earth you're doing.

            It is a lot more work up-front, but as a result you have a fully deterministic method of installing and configuring complex systems. Nix also shines in letting you set up temporary environments like this. Almost like Python virtual environments, but not limited to Python. They can be conjured and discarded at will without impacting the rest of the system.

            I tried it for a couple months and was generally impressed, but it takes a lot of trial and error to get things working. The error messages from Nix typically are not very helpful, and a few of the tweaks I need to get my desktop system working properly (like changing the default monitor in GDM) were not exposed at the time.

              • PorkrollPosadist [he/him, they/them]
                ·
                edit-2
                1 year ago

                Even though I am a big Emacs head, I have not. It does look pretty cool though. I'll have to try it someday. Ultimately I ended up on Gentoo. It lands in a similar niche in terms of being a meta-distribution, but it does not take a declarative approach to configuration. The biggest drawback of Gentoo in comparison to NixOS / Guix is that it isn't able to cache a vast array of package configurations the way NixOS does. Everything needs to be compiled, whereas on NixOS you can flip one switch and instantly get a package that was compiled with different build-time options / dependencies.