1. 33
  1.  

  2. 4

    I tried nix as an OS a while ago, but the biggest block for me was the total lack of doc.

    Like, the only recommendation I got from every other NixOS user was “just look through people’s nix config files”.

    No?

    When I want to install and configure a package, I want to know what I can or cannot do in the configuration, and looking through someone who installs it themselves will only show me what can be done their way, nothing else.

    Maybe, once NixOS and Nix will get a decent document I may try again.

    1. 9

      I disagree that “total lack of docs” is a fair characterization. I think its more subtle than that.

      There’s huge manual, which explains everything: https://nixos.org/manual/nixos/stable/index.html. There’s also “API reference” documentation, in the form of Options Search.

      The two things are lacking though:

      • bite-sized guides explaining how to do a specific things (django guides or archi-linux wiki are prime examples). This is a bit of the ecosystem which I think is missing (but somewhat compensated for by an excellent discourse).
      • source-level documentation on how to build modified version of each specific package (ie, how do I build foo, but using my own fork of source code). But this is basically “building from source” territory: I think most of the systems require looking at the source at this level of customization?
      1. 3

        I agree with this caveat, but in my experience GP is still basically correct that “try to find a config that has already solved this” is a critical skill/step before you’ve built up enough steam to efficiently solve most problems yourself.

        Maybe I’m part of the problem, here, but if someone asks questions like “is there a package for X?” or “has anyone configured Y?” and I don’t have personal experience with it, my first stop is usually a code search. And, if I find something good, my response is usually a link to the code search itself, so that the asker can see how to build queries like this going forward.

        1. 4

          Fully agree! I should’ve made clear that I disagree with a specific point rather than with overall conclusion. Though, for me personally the trick is “ask stupid question on discourse” rather than code search.

          1. 2

            I thought the trick has always been to say “x can’t do y” and everyone will jump in to “correct” you and you get your answer without looking dumb.

        2. 1

          OK, I wasn’t fair. There’s a setup doc and a “general random tips and docs about common tasks and softwares” dumped on one huge and unbookmarkable page.

          What about a software-specific configuration reference?

          Edit: for example, say I want to setup a wayland-based sway environment on top of nixos. I don’t even know if it’s supported by the system at hand, as it consistently pushes X11 forward.

          1. 1

            The options search I’ve mentioned above gives some info: https://search.nixos.org/options?show=programs.sway.enable&query=Sway&from=0&size=30&sort=relevance&channel=unstable#disabled

            programs.sway.enable

            Description

            Whether to enable Sway, the i3-compatible tiling Wayland compositor. You can manually launch Sway by executing “exec sway” on a TTY. Copy /etc/sway/config to ~/.config/sway/config to modify the default configuration. See https://github.com/swaywm/sway/wiki and “man 5 sway” for more information. Please have a look at the “extraSessionCommands” example for running programs natively under Wayland.

            I don’t know how complete or correct this is.

      2. 2

        I wonder what it’d take to port the Nix package manager to FreeBSD.

        1. 8

          Never mind. Looks like it has already been ported: https://www.freshports.org/sysutils/nix/

        2. 2

          Why not PKGSRC?

          1. 2

            Pkgsrc is great, but Nix has a stronger emphasis on reproducibility and immutable state.

            1. 1

              Got it. I will try it out in VM.

          2. 1

            I’ve always wanted to try NixOS, but I don’t want to taint my computer with systemd.

            I’ll try it whenever somebody forks it and removes the systemd dependency or they release a systemd-free version.

            /shrug

            1. 5

              I don’t think that will happen, as NixOS uses several good features from systemd. You can also just try Nix, for handling packages and dependencies for your projects.

              1. 8

                There was a talk at NixCon about abstracting out services in NixOS:

                https://cfp.nixcon.org/nixcon2020/talk/TW79FU/

                Allowing us to reuse the service configuration for launchd on macOS or various alternatives like supervisord.

                1. 1

                  I might try the Nix sometime. But for now it looks like I can safely cross NixOS off the list of distros to try.

                  1. 17

                    If blind hatred of systemd here is what is holding you back, maybe try broadening your horizons a bit.

                    NixOS uses it to good effect.

                    1. 5

                      Did you really just assume that my hatred of systemd is blind?

                      That I, in no way, have a rational disgust for this software?

                      systemd is a horrible piece of software for many reasons:

                      1. The undeniable feature creep. While some people actually enjoy the features brought in from it (boot manager, network manager, login manager, home manager, etc), I find them to be nothing but bloat. An init system should be just that. An init system. Not <insert an exaggerated amount of functions here>.

                      2. It is slow. Slow to shutdown, slow to boot up, etc. Here are actual timed reboots from my machine using 3 init systems. systemd (2m3s), OpenRC (11s), Runit (7s). 2m3s vs 7s, which would you choose?

                      3. Due to the feature creep, there is a larger attack service for bugs and security vulnerabilities. And there are security issues with systemd.

                      4. This is the one that bothers me the most. It’s almost as if the dev(s) are completely oblivious or at least ignorant to the feature creep and security issues.

                      5. A lot of the time, we don’t even get the choice to not use systemd. There a lot of packages (and the list grows every day) of packages with a hard dependency of systemd, So unless you modify that program yourself, you literally won’t be able to use it unless you succumb to using systemd.

                      6. There are privacy issues with it. For example the hardcoding of Google’s DNS. “It’s a fallback”, that’s no excuse. At some point someone will be using that and their privacy will be ruined.

                      Now, some of these you could call nitpicks (like the reboot times). However I find issues 1, 4, 5, and 6 just unacceptable. Those are what absolutely keep me from using it.


                      This is my abridged list of issues, but I can make an even larger wall of text if you want me to.


                      And I really don’t appreciate your tone. You sound very stuck up and pretentious telling me to “broaden my horizons”.

                      On top of the fact that you just assumed that I had no reason to hate systemd. Honestly.

                      All you had to do was ask, “hey, may I know what about systemd you hate? why is it bad?”.

                      But no, you decide to insult me with your stupid response.

                      1. 10

                        You don’t have to use it forever, or even agree with its implementation! You don’t have to trash your daily driver!

                        But my dude, not even giving it a shot because of your issues with systemd (quite aside from whether or not those are valid, which I mostly think they are…I rather despise it for other reasons) is cutting off the nose to spite the face–especially since you also don’t want to try Guix.

                        I meant broadening your horizons in the literal sense: there is some really interesting stuff happening in those ecosystems, and even a brief foray into them may be really useful and neat–or it might not. But, like, if you refuse to even try because of NixOS’s use of systemd, you’re letting those developers harm you twice.

                        1. 4

                          I apologize for my rudeness. At the time I had literally just woken up, haven’t had any coffee or cigarettes, and the first thing I saw was someone telling me that I have a blind hatred and that I need to broaden my horizons.

                          Surely you can admit that from my perspective, that would be at least a little irritating.

                          I can agree with what you’re saying, but personally I can’t do it. Using an OS which uses systemd would be justifying it. And I can’t allow that. That would be hypocritical and unjust.

                          “Be the change you want to see”: By refusing to use anything with systemd, I as an individual am giving less power to it and it’s devs.

                          1. 2

                            No sweat–I probably could’ve found a gentler phrasing than “broaden your horizons”. My apologies!

                2. 3

                  What about Guix?

                  1. 2

                    No thank you. Guix is a rant for another time, but trust me when I say I hold a disain for it.

                    1. 7

                      I’d like to hear that rant some time, out of curiosity.

                      1. 2

                        I second this, even just a rought draft would do.

                        1. 1

                          Maybe sometime.

                          When I rant, it messes my whole day up. I’m still seething about the “blind hatred of systemd” thing.

                          1. 1

                            Seconded. This person seems to have interesting opinions.

                      2. 3

                        You can use Nix and nix packages without systemd… nix is a package management system, and does not itself run any services.

                        1. 1

                          I was mainly interested in the OS, not the package manager.

                          But at some point I plan on trying Nix. If I like it enough, I might run NixOS in a VM.

                        2. 1

                          You can use systemD free version PKGSRC

                          1. 9

                            pkgsrc completely lacks the desired-state, functional language, and system management components of nix. It’s an apples and oranges comparison.

                            1. 1

                              Can you demonstrate how I can install multiple different versions of the same package without breaking the system install via pkgsrc?

                              As well as defining everything in a declarative way? I already use the “systemd free version” known as macos nix package manager. And I can do the same on any linux.

                              Also will need a way to do things like nix overlays which let me add custom patches to package builds.

                              Drive by comments like this without explaining how PKGSRC replaces or can be an alternative aren’t very useful. And as a note, I’ve set a super high bar for PKGSRC here but thats due to I get all of the above (and more) for free from the nix package manager. Nixos adds some more neat bits but ultimately its all on top of nix.