I have been using Gentoo exclusively for about two years and really enjoyed it. The customization and package manager is just top-notch. I have been curious about NixOS for some time, just randomly seeing it pop in some discussion, but never really looked into it. One day YouTube recommends this video about flakes for development instead of using Dockerfiles.

It intrigued me because I am not really fan of Dockerfiles. In my experience, it is too easy for something to break and pretty hard to maintain them properly. Plus, it is really annoying to use them for development.

So I started looking into Nix and then NixOS and created a new partition and installed it and so far it is a pretty interesting experience. The system is pretty customizable, and it is nice having the entire system described in configuration files. I could see myself using the same config for my laptop and desktop and just sync them. It is really nice and easy to have your entire system configuration in git repo, much easier than what I used with things like etckeeper.

So far there are only few issues I encountered. Not every package is implemented properly, so some configuration is the same old story of using files in /etc or maybe just specifying a configuration file in your config. I’ve also read about some issues with Nix not using FHS (Filesystem Hierarchy Standard) for example Steam had some issues but so far I didn’t encounter them. Also, the documentation is not what I am used to coming from Gentoo, but it is still usable.

The last issue I have is not really an issue. It is pretty time-consuming to make your entire configuration, especially if you want to use flakes. I’ve been slowly adding more and more but so far only into default configuration.nix and would love to rewrite it completely into flakes, but it takes time.

So far I didn’t decide that I would be not going back to Gentoo, but it is fascinating experience. I am especially curious how will this impact my development workflow because it should be much easier to control dependencies per project. Especially with something like Python (always really hated using venvs).

Anyone else trying NixOS or using it already?

  • @dxpvanishing
    link
    English
    311 months ago

    I recently switched from Arch to NixOS and so far I’m liking it. I have looked into flakes, but all of the repositories I’ve seen on Github that use flakes seem to be very complicated with a ton of boilerplate code. In any case, my configuration is coming along nicely, although there are a few things I haven’t managed to manage using Nix. I am definitely not planning to go back to Arch.

    The main issue I have with the documentation is that it is in several different places and is not as comprehensive as the Arch wiki. The other main issue (besides the time commitment) is that I can’t connect to eduroam – my university’s script assumes FHS.

    • @Prologue7642OP
      link
      English
      111 months ago

      Flakes are really cool, and I really like the idea. It solves a lot of issues with Nix for me. But I installed NixOS about a week ago, and now I am stuck in sort of limbo where I don’t want to edit configuration that much because I want to switch to flakes. But switching to flakes takes quite a bit of time. Hopefully soon I will finally get around to doing it.

      The documentation is quite rough. Official documentation is pretty bare bones and NixOS wiki is nowhere close to Gentoo or Arch Wiki.

      Just out of curiosity, what part of your university script assumes FHS? In my experience, there is nothing really special about eduroam Wi-Fi.

      • @dxpvanishing
        link
        English
        111 months ago

        My plan with flakes is to figure out how to manage everything using Nix first, and then move my configuration into a flake. I presume this will take a long time.

        To be precise, the university wifi script downloads a large number of Python files into a temporary folder and then runs them, where the Python scripts assume that openssl and other binaries are in FHS locations. I am aware that there are ways to simulate an FHS environment in NixOS, so I will try again sometime.

  • @PorkrollPosadist
    link
    English
    3
    edit-2
    11 months ago

    I’ve used Gentoo for the past five years or so, and off and on for another decade and a half prior. I tried out NixOS for a couple of months and thought it was pretty cool, but in practice maintaining it was not very fun. A lot of things can be set up with one-liners in your Nix file, but other simple things, like making the login prompt show up on the correct display (i.e. my monitor, not the TV) are murder. Setting up complex systems like NextCloud along with Apache and PostgreSQL requires cross-referencing the upstream manuals with the Nix manuals, diving into the actual Nix packages, and you run into a lot of edge-case bugs with little documentation. Also, NixOps is an absolute shit show (to be fair, this is 3rd party, not NixOS’s fault).

    If you can get past the absolutely useless error messages and set up a working configuration, it is very cool. Getting to that point can take several days though. Doing updates without waiting for compilation is very convenient.

    • @Prologue7642OP
      link
      English
      211 months ago

      That is something that I am encountering too. If there is support for what you want to do, it is really easy to do. But if you want something unorthodox, it is often quite complicated. Hopefully that is partially due to my inexperience. I remember when I first installed Gentoo, I also had no idea what I was doing.

      Thankfully I don’t really need to worry about setting up databases and other services, I have another server at home that is running everything I need, so I just need to focus on my configuration.

      The update experience is really strange for me. I almost became addicted to doing updates every day, and now they just happen, and I don’t even get to see that something is installing.

      I am really curious if I will be able to get my config to the point where I can just use one config for both my desktop and laptop. It would be really nice as I usually don’t use my laptop for work stuff but on rare occasions that I do, I always find I am missing something.

  • @paperemail@links.rocks
    link
    fedilink
    English
    211 months ago

    I’ve been using NixOS as my primary OS for a few months now, and I totally love it.

    I do agree that it can be a time-sink, especially if you want to use one config over multiple systems (I’m using colmena1); and the documentation is definitely not quite perfect. (but you can help!)

    I especially love the way you can group changes logically.

    Example: I can have a single samba.nix that contains not just the smb.conf, everything else that’s needed specifically for samba.

    • mountpoints of filesystems
    • smb share configuration
    • samba users config
    • firewall settings (open samba ports)
  • @whoami
    link
    English
    211 months ago

    I tried it a long time ago and I liked it but didn’t stick with it.

    Have you tried GUIX?

    • @Prologue7642OP
      link
      English
      211 months ago

      I thought about it but chose NixOS in the end. The community is much bigger, and it should be easier to use Nix in my development work.

      • @whoami
        link
        English
        111 months ago

        yeah I think nix has a bigger userbase than guix…I’ve only tried guix in a VM. I like the idea of both distros but am too comfortable on debian