| 1 | # clover's snow globe |
| 2 | |
| 3 | This codebase contains declarative configuration to run my home server, a |
| 4 | computer sitting in my closet used daily to power my activities. It first and |
| 5 | foremost acts as a file store for my ongoing and archived projects for |
| 6 | [paper clover]. Secondly, it contains a ton of apps for me and friends to use, |
| 7 | from Jellyfin and Navidrome for media consumption to git hosting and render |
| 8 | farms. |
| 9 | |
| 10 | The system is built out of a NixOS base (just to install the system itself), |
| 11 | using managed docker containers (managed via Nomad) and virtual machines to run |
| 12 | all the real services. There is a lot of custom tooling to spawn interactive |
| 13 | testing environments. For example, without even pushing any code, I can edit the |
| 14 | configuration of a service or upgrade it, then spin up an isolated domain like |
| 15 | `shale-4c84f9da.staging.paperclover.net` to verify changes. Then, pushing to |
| 16 | production ensures that the new deployment is healthy before routing traffic to |
| 17 | it -- It's kind of like "easy kubernetes." |
| 18 | |
| 19 | [paper clover]: https://paperclover.net |
| 20 | |
| 21 | ## filesystem layout |
| 22 | |
| 23 | The computer mounts the ZFS root dataset under `/srv`, meaning "server," loosely |
| 24 | following the linux convention. Within, it's a unique structure: |
| 25 | |
| 26 | ``` |
| 27 | srv/ |
| 28 | +--- clover/ [dataset] user-data storage, what I mount as /Volumes/clover |
| 29 | +--- Archive/<year> personal archive. one folder per year, scrambled within. |
| 30 | +--- Asset/ resources, sample packs, audio plugins, stock videos |
| 31 | +--- Blender/ |
| 32 | +--- Font/ (moved from zenith Documents/Font, will be stable index) |
| 33 | +--- Samples/ |
| 34 | +--- Texture/ |
| 35 | +--- Video/ |
| 36 | +--- Documents/ |
| 37 | +--- Project/ currently active project files |
| 38 | +--- Media/ [dataset] files from the world-wide-web. managed partially manually |
| 39 | +--- jellyfin/ |
| 40 | +--- mirror/ |
| 41 | +--- music/ (used by navidrome) |
| 42 | +--- music-intake/ (to be manually indexed) |
| 43 | +--- seedbox/ |
| 44 | +--- vm/ (virtual machine images) |
| 45 | +--- Published/ source of truth for `paperclover.net/file` |
| 46 | +--- prod/ [dataset] production application data |
| 47 | +--- shale/ [dataset] (each service is its own dataset) |
| 48 | +--- ... |
| 49 | +--- staging/ staging deployments use this space for temporary clones |
| 50 | +--- postgres-9f06f74b/ [dataset] |
| 51 | +--- vm/ [dataset] virtual machines |
| 52 | +--- clover-sandbox/ [dataset] |
| 53 | ``` |
| 54 | |
| 55 | Media is it's own dataset so it can be snapshotted independently of my personal |
| 56 | data (less frequent, lower retention), and all my personal files are on the same |
| 57 | dataset to allow fast move/copying between top level folders. Services use their |
| 58 | own datasets to implement copy-on-write forks. |