thegrayarea · Codeberg.org

NixOS Server Configuration

Usage

This is my home server, mainly used for private data storage. This is stuff like my photos through Immich, or my location history through Dawarich. I know many home servers are used for media streaming, but I don't really enjoy watching movies or shows, so that's not a main use case for me, though I do have Jellyfin just in case.
Additionally, it provides some helpful utilities for my daily tasks, such as a (heavily used) private git server, among other things. Finally, I use it for a testing ground to learn about Nix and generally tinker and discover new projects.

The Hardware

HP Z420 with 64GB memory and a 12 core Intel Xeon.
The storage situation is rough: I have 4 1tb hard drives in RAIDZ1.
It's not efficient, but I got them for free.
My plan was to purchase some larger drives, but.... ya know.
(The OS drive is a 200GB bcachefs ssd.)
There is technically a GPU in here (980 Ti), but I don't use it for much, since I don't need transcoding for Jellyfin and Cuda support has been dropped on it.

The Software

I've found in the Nix world that often configs are extremely complicated for no apparent reason. I'm not against using the fancy features, but I'm not going to use them because they're fancy: I'm going to use them because they're actually useful or solve a problem I have. So, the principle is to not use anything unless it's absolutely necessary, which lends itself to this quite simple configuration.

Each service (as of now) is contained within its own .nix file, under the modules directory. The system configurations are under the system directory. To access the services, I use Caddy along with Tailscale Services for remote access and https. I use Authentik for identity management, which allows me to have one or two accounts total rather than separate accounts for each and every service.

Huge thanks to:

Callum for helping me with many things about the Nix server, especially zfs setup.

Feel free to reach out if you have any questions about the config or how I did things, I'd be happy to talk about it!

Read the original on codeberg.org ↗