1# clover's snow globe
2
3This codebase contains declarative configuration to run my home server, a
4computer sitting in my closet used daily to power my activities. It first and
5foremost 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,
7from Jellyfin and Navidrome for media consumption to git hosting and render
8farms.
9
10The system is built out of a NixOS base (just to install the system itself),
11using managed docker containers (managed via Nomad) and virtual machines to run
12all the real services. There is a lot of custom tooling to spawn interactive
13testing environments. For example, without even pushing any code, I can edit the
14configuration 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
16production ensures that the new deployment is healthy before routing traffic to
17it -- It's kind of like "easy kubernetes."
18
19[paper clover]: https://paperclover.net
20
21## filesystem layout
22
23The computer mounts the ZFS root dataset under `/srv`, meaning "server," loosely
24following the linux convention. Within, it's a unique structure:
25
26```
27srv/
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
55Media is it's own dataset so it can be snapshotted independently of my personal
56data (less frequent, lower retention), and all my personal files are on the same
57dataset to allow fast move/copying between top level folders. Services use their
58own datasets to implement copy-on-write forks.