I’m planning on, eventually, putting together a NAS for myself. I’ve basically narrowed down the selection to either trying NixOS or going for TrueNAS, however I can’t figure out how to decide between those two, as they are fundamentally quite different.

TrueNAS is a dedicated NAS OS so that’s obviously enticing for me, but I heard if you also want to do some server stuff like hosting some things and not just storing data it is subpar? I never got the information out of people what exactly is supposed to be subpar about it, but I’ve seen those complaints a handful of times.

Meanwhile NixOS is just a Linux distro. I’m familiar enough with Linux, although NixOS is its own beast and from what I heard its documentation isn’t quite what you’d get out of for instance the Arch Wiki, but it being declarative and easy to restore old versions in case something breaks allegedly makes it rock solid, so that also sounds interesting.

So, after thinking about those things, I was wondering if any of you who use either of them could share your experiences and what you like or dislike about either option?

  • smiletolerantly@awful.systems
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    9 days ago

    We have NixOS, Proxmox and TrueNAS in use.

    • TrueNAS on a dedicated NAS host. It’s great for that, and has been super stable. The snapshotting works great, and all the little tasks associated with a NAS are taken care of without needing to spare a thought.
    • Proxmox as VMS host. You haven’t mentioned it above, so I’ll leave it at this: also works really well for its purpose.
    • NixOS: acouple dozen NixOS VMs runnign on the Proxmox hosts. I like the separation (i.e.: one VM <-> one task/service), but it’s not necessary, esp. if you plan on using a stable branch. I absolutely love NixOS, and would never run server applications on anything else ever again. The documentation thing is trueish. There’s not even close to the same documentation as with e.g. Arch and the Arch Wiki, but that makes sense when you think about it: instead of hundreds of lines of documentation, you hide that complexity behind an option, e.g. graphics.nvidia.enable = true; which then becomes pretty self-explanatory, at least if you are somewhat familiar with the ecosystem already. The way I’d recommend going about documentation with nix is this:
      • go to search.nixos.org/options, search for the service you would like to host. 90% of the time, the options and descriptions shown are all you need.
      • if an option is unclear, click on its “declared in” link. You’ll be taken to the module source in nixpkgs. Look at what they are doing there/the comments explaining why. Often, this resolves any ambiguity, or helps you out with your goal.
      • if that did not help, check the NixOS wiki; often, common pitfalls are documented there, together with the nix expression to fix them.
      • another great way is to search GitHub for language:nix <thing you need to do>. As a random example: I recently wasn’t sure how to configuring scaling in hyprland on NixOS, but searching for an appropriate term will quickly show you how other people have solved the same problem. It’s not really documentation, but the declarative nature of nix means it’s easy to find TONS of working examples via a github search.
      • all else failing, ask on discourse.nixos.org. Youńll usually get useful help very quickly there.

    So, what’s my advice?

    If you are unfamiliar with NixOS, it’s probably a bit of a headache getting a NAS to run satisfactory. Truenas works so well, there isn’t really a need for nix. But running your services in nix is great, totally recommend!

  • curbstickle@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 days ago

    Personally, I keep storage and compute separate, makes it easier to maintain IMO. Where I have done it on a single box, ive just gone with a regular old Debian box and dropped in the drives.

    I am considering playing with rockstor on a spare beige box I have, but basically the same separation of storage and compute will apply.

  • dblsaiko@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 days ago

    I haven’t tried TrueNAS, but I use NixOS for my NAS and my other servers. It’s perfect for servers imo since it’s essentially a Linux system builder that you can customize to add whatever you want to your system.

    The downside is that you’ll have to learn a weird functional programming language, especially when you get into writing service modules yourself (for services that don’t have an upstream module). And it’ll take some time to get familiar with it and learn how to effectively write your configuration.

  • k0mprssd@pie.bumbum.lol
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 days ago

    I like having truenas in a proxmox vm. through proxmox you can easily do backups of your vms and in my head it containerizes things. I’ve had so many problems trying to use truenas as anything but a pure nas so having it as a vm in proxmox gives me the flexibility to run other vms and containers on my machine, and proxmox can easily be set up to connect to a nas and keep vm and container data on it.

  • beeng@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 days ago

    Meh,

    Debian with docker and Samba. Done.

    Nixos if you want to repeat it… (Wouldn’t do it as my first NixOS experience)

    TrueNAS if you want clicky GUI handhold.

  • Starfighter@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    10 days ago

    How well NixOS fits your purpose really depends on what you want to do with the OS. If you’re just going run a bunch of docker containers, you could manage them via Nix but its a little cumbersome.

    Where NixOS really shines for small servers are the so called NixOS Options. They allow you to install tons of services on bare metal but manage all the configuration for you. E.g. open the correct firewalls ports, run a dedicated DB or cache, etc. and all those simply require you to enable them with an ... = true;.

    Smaller projects might not have a NixOS Option available and some options are more and/or easier configurable than others, but if you’re running just a few common services you could feasibly manage your whole server with just one native config file and no docker shenanigans.

    I’d recommend checking what’s available under the link above. If you wanna go the container route instead, you have the option of just using docker non-declaratively as on every other distro (but then you lose some of the benefits NixOS gives you), or you can declaratively have NixOS manage all the docker containers. There are a few ways to do and manage this so some further research will be required.

  • monkeyman512@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 days ago

    Truenas has the primary focus of being a NAS. Running apps or VMs is more of a side thing. It can do these things fine, but because it’s not the primary focus it doesn’t get the same level of polish as the NAS aspects.

    My personal solution is to run Proxmox as the host OS with a Truenas VM. Any other services I want to run get to live in VMs or LXC containers. For example all my docker services run across 3 VMs with a docker swarm setup.

    • philpo@feddit.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      10 days ago

      The question is why use both. TrueNAS adds a lot of overhead, tends to become unstable if the workload is high in a VM, can lead to problems especially with ZFS and it often leads to people using privileged containers to use NFS directly (for ease of use) or use a mount bind solution via the host.

      With ZFS NFS the whole thing can easily be provided directly and then use mount bind - which is way more consistent. With Cockpit and Napp-it you have graphical tools available.

      Don’t get me wrong, for an existing solution it’s fine,but if one is doing a new build I would absolutely not go for it. TrueNAS has some oddities with permission handling one can also avoid if doing it directly - and far more stringent.

      Personally Proxmox+ZFS is imho currently the best bet in that regard, especially if you can avoid Samba. (The Zamba Server is solid,though). Especially with a FreeIPA/RhelIDM setup things are surprisingly easy/stringent in terms of permission handling.

      • monkeyman512@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        9 days ago

        My setup is very influenced by consolidating multiple hosts to a single host. So far this setup has been extremely stable for me with the only quirk being the Truenas web gui initially loads very slowly if I haven’t accessed in a couple days. I assume it’s because all the memory for that has gone to swap to make space for caching.

        • philpo@feddit.org
          link
          fedilink
          English
          arrow-up
          0
          ·
          9 days ago

          Yeah, I come from the same scenario. Consolidated multiple nodes incl. a NAS into one. Initially had the HDD (which run through a controller anyway) passed through to a TrueNAS VM. That was…a mistake. TrueNAS can become a real bitch if it’s own VM storage is slower/has a hiccup while the rest of the pool is not. And a lot of other things are a PIA as well, e.g.permission wise, especially with a FreeIPA Domain. And all that for a quite hefty price in ressources.

          The day I pulled the plug on that was a good day. Later had the issue repeat itself with a client system that the client brought with him.

          Nowadays I really love the proxmox only solution,even though it’s somewhat icky to run something directoy on the host - but it’s acceptable imho,when it’s literally built onto host data-as it is the case for ZFS NFS anyway.

          (I have Samba in a proper LXC, though - but rarely use it these days as we run everything via NFSv4 by now)

  • rumba@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 days ago

    I run Nix on my primary box and my travel laptop. I was intimately familiar with Linux before my first NixOS install.

    You’ll get the primary install up pretty quickly. If you have trouble with the nix.configuration, 9 out of 10 times chatGPT can can get you more or less what you’re looking for in documentation. It’s probably the single shining positive use of LLMs.

    Adding things to the config once you know what you’re trying to add and where you’re trying to add it is not difficult at all. Sometimes documentation will tell you to use certain commands that don’t seem to be available It’s usually that you’re missing a include which are somewhat cagey.

    All that said, other than partial immutability, I don’t know that you’re going to reap any true benefit from nix other than the challenge. It’s a nas, so you’re not going to be moving it between different hardware. The data itself isn’t immutable or protected or backed up in any way specific. I fear you’d just be fighting nix to support, manage and maintain RAID or ZFS.

    Another pretty serious complication that Nix throws at you is major updates. Individual nix channel and home manager rebuilds aren’t too bad, But when you need to run that 25.11 update You’ve got a pretty good chance at breaking your system. And it’s not like they continue to run the older updates forever, they EOL those previous versions pretty quickly. That’s actually one of the things keeping me from running it on more serverses they lack of a true LTS. A new major stable comes out every 6 months and you have one month after it comes out before the old version is EOL

    For my laptop and desktop that’s no big deal. But not so much for servers that I don’t want to dick with all the time.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 days ago

    I’d avoid NixOS personally. It is to obscure of a Linux distros to be widely supported.

    TrueNAS all the way. If you want something more you could virtualize it by picking up a extra Data/SAS card and passing it though to a TrueNAS VM.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        9 days ago

        By whom?

        I’d rather stick with more standard tools. Ansible is a big one but there are other tools you can you to auto provision VMs.

        • OhVenus_Baby@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          9 days ago

          NIXos is a cross-platform package manager for Unix-like systems, and a tool to instantiate and manage those systems, invented in 2003[6] by Eelco Dolstra.

          Nix Original author(s) Eelco Dolstra Initial release June 15, 2003; 22 years ago

          From Wikipedia.