I'm currently working on testing out and prototyping a new #server based on #NixOS! The hardware isn't new because I'm just recycling my old desktop (previously known by the hostname Higher and later Radiance) with the goal of building a replacement for my current Sunfish server with a better CPU (for now a dual core but I'm planning an upgrade), more RAM (16GB over the current 4GB, although no more ECC), tons of RAID configured hard disks (currently testing old random disks) and much more!
Today I found a 24 port gigabit switch at a flea market for just €10, however it seems to work properly only after unplugging and replugging the power a few times, so I'm not sure how realiable it is. It sure will be interesting to test.
With the help of @ITzTravelInTime the new server is in the new case and up on the shelf alongside the current server. The funny thing is that the power and hard drive LEDs are at the top but they emit enough light to project themselves at the top, this is nice because to check if it's still on or if it's doing some I/O operations I can just move my head up to glance at the lights.
I got Isso (the commenting system used on my website) configured and running, however due to Cross-Origin Resource Sharing (CORS) rules and what not I'm not able to fully test it, but apparently from the logs I'm getting it is actually working.
I added my custom zsh and powerlevel10k configurations to the configuration.nix and now I have a cool and consistent shell across multiple systems (my laptop and the current servers have the same shell setup).
I successfully updated to NixOS 23.05, changing a setting for OpenSSH, renaming some configuration options for Gogs and changing the package bpytop to btop were the only problems I had. Yesterday I had to switch from the Linux-libre kernel to the mainline one because the new version wouldn't compile as there isn't much support from the NixOS devs for it, regardless it was mainly an experiment for hardware compatibility (surprisingly the new ethernet card powered by Realtek worked just fine).
I bought a new case! It's an iTek EVOKE, @ITzTravelInTime suggested it to me since it's nice and compact and it lets me add many hard drives despite it looking small. I also bought a bunch of cheap Arctic fans and a 2.5 gigabit ethernet card as a little upgrade from the motherboard's built-in ethernet.
I got #Prosody working with all the data, although I can't properly test it because of SSL certificates that I can't transfer now because they're in use on the current server, of course.
I got Gogs to work with all the data. I can already tell that transitioning that to the new server will be nice and smooth (hopefully I didn't jinx myself into getting some extra problems later on).
A big challenge I need to overcome is space: unlike the current Sunfish server and as you could see in the photos I took, this thing is basically a pretty standard desktop and if I can take it off the floor and put it in a much smaller case that still allows me to play with hard drives and possibly put a GPU in it, that'd be great, but for now my server can't just be a random noisy desktop standing on the floor like now, and no, I don't have a closet where I can shove it in. I need another case!
A probably very necessary upgrade is a new CPU (maybe a six-core i5?) since the current dual core Pentium could become problematic, especially when it comes to Jellyfin encoding since the integrated graphics of this thing are crappy, but still enough to be superior to just assigning the encoding to clients which may use Jellyfin apps that do not support local encoding fully or at all. I could always add a graphics card for that if I get my hands on a decent one that I don't need anywhere else.
Mainly I need hard drives for the main storage of the server (websites, Nextcloud, Jellyfin, Git, Matrix, basically all that's being handled by the current server) and redundancy for my main desktop which has a 6TB hard drive but lacking any proper redundancy and backup. In case I ever run out of SATA ports or need to add even more drives, I will look into buying one of those PCIe cards that add SATA ports.
In the future I want to develop a redundancy system so that I can copy service data and secrets on the hard drives, like that I can take advantage of the high speeds of solid state storage where the OS is installed while still retaining some redundancy (the strategy may change in the future). At the moment the OS is running on a random SATA SSD, but I plan to buy an NVMe to PCIe adapter and buy a 1 or 2TB NVMe SSD to put in there, saving up SATA ports for hard drives.
For now the configuration.nix file is structured mostly like a standard one (the one the graphical installer generates) as a general baseline for me to learn Nix properly. The main modifications I've done are the Linux-libre kernel (because I can) and disabling non-free software and drivers, some users with password files, a simple RAID-0 BTRFS setup with three random hard drives I had lying around (~700GB total) and services like Nginx, Jellyfin and Syncthing.
There's also https://nixos.wiki which is a community driven wiki with several articles detailing how to configure certain services. It's not as complete as the Arch Wiki by any means, but it's still a very nice addition.
This makes my life much easier because on a more standard distro, like #Debian that I use on Sunfish, the configuration files for every system component and service are all spread into different places, and if I ever need to redeploy the server for whatever reason I can just boot into a NixOS live USB and feed it the configuration file which will do most of the setup work for me. Also it's a bit easier to find packages and configuration options on NixOS thanks to search.nixos.org.
The main advantage of using #NixOS is that the whole system and its services can easily be configured with just one (or optionally multiple) configuration file. For example, in just a few lines of Nix (the declarative language used by the Nix package manager) I can tell what packages have to be installed, in my case stuff like #Nginx, #Jellyfin, #Syncthing, etc., and I can tell it how each service must be configured (Nginx virtual hosts, Syncthing config and data folders and so on).