clover's snow globe

This codebase contains declarative configuration to run my home server, a computer sitting in my closet used daily to power my activities. It first and foremost acts as a file store for my ongoing and archived projects for paper clover. Secondly, it contains a ton of apps for me and friends to use, from Jellyfin and Navidrome for media consumption to git hosting and render farms.

The system is built out of a NixOS base (just to install the system itself), using managed docker containers (managed via Nomad) and virtual machines to run all the real services. There is a lot of custom tooling to spawn interactive testing environments. For example, without even pushing any code, I can edit the configuration of a service or upgrade it, then spin up an isolated domain like shale-4c84f9da.staging.paperclover.net to verify changes. Then, pushing to production ensures that the new deployment is healthy before routing traffic to it -- It's kind of like "easy kubernetes."

filesystem layout

The computer mounts the ZFS root dataset under /srv, meaning "server," loosely following the linux convention. Within, it's a unique structure:

srv/
+--- clover/ [dataset]       user-data storage, what I mount as /Volumes/clover
     +--- Archive/<year>     personal archive. one folder per year, scrambled within.
     +--- Asset/             resources, sample packs, audio plugins, stock videos
          +--- Blender/      
          +--- Font/         (moved from zenith Documents/Font, will be stable index)
          +--- Samples/      
          +--- Texture/      
          +--- Video/      
     +--- Documents/
     +--- Project/           currently active project files
     +--- Media/ [dataset]   files from the world-wide-web. managed partially manually
          +--- jellyfin/
          +--- mirror/
          +--- music/        (used by navidrome)
          +--- music-intake/ (to be manually indexed)
          +--- seedbox/
          +--- vm/           (virtual machine images)
     +--- Published/         source of truth for `paperclover.net/file`
+--- prod/ [dataset]         production application data
     +--- shale/ [dataset]   (each service is its own dataset)
     +--- ...
+--- staging/                staging deployments use this space for temporary clones
     +--- postgres-9f06f74b/ [dataset]
+--- vm/ [dataset]           virtual machines
     +--- clover-sandbox/    [dataset]

Media is it's own dataset so it can be snapshotted independently of my personal data (less frequent, lower retention), and all my personal files are on the same dataset to allow fast move/copying between top level folders. Services use their own datasets to implement copy-on-write forks.