Modules

<shared>

Common configuration enabled on all hosts.

Alerts:

  • A zpool is in "degraded" status (alertmanager)

Options:

Declared in: shared/default.nix

bookdb

bookdb is a webapp to keep track of all my books, with a public instance on bookdb.barrucadu.co.uk.

bookdb uses a containerised elasticsearch database, it also stores uploaded book cover images.

Backups: the elasticsearch database and uploaded files.

Erase your darlings: overrides the dataDir.

Options:

Declared in: shared/bookdb/default.nix

bookmarks

bookmarks is a webapp to keep track of all my bookmarks, with a public instance on bookmarks.barrucadu.co.uk.

bookmarks uses a containerised elasticsearch database.

Backups: the elasticsearch database.

Options:

Declared in: shared/bookmarks/default.nix

concourse

Concourse CI is a "continuous thing-doer", it's a CI / CD tool. This module sets up a single-user instance, with GitHub authentication.

Concourse uses a containerised postgres database.

Provides a grafana dashboard.

Backups: the postgres database.

Options:

Declared in: shared/concourse/default.nix

erase-your-darlings

Wipe / on boot, inspired by "erase your darlings".

This module is responsible for configuring standard NixOS options and services, all of my modules have their own erase-your-darlings.nix file which makes any changes that they need.

This requires a setting up ZFS in a specific way when first installing NixOS. See the "set up a new host" runbook.

Options:

Declared in: shared/erase-your-darlings/default.nix

finder

finder is a webapp to read downloaded manga. There is no public deployment.

finder uses a containerised elasticsearch database, and requires read access to the filesystem where manga is stored. It does not manage the manga, only provides an interface to search and read.

The database can be recreated from the manga files, so this module does not include a backup script.

Options:

Declared in: shared/finder/default.nix

foundryvtt

FoundryVTT is a virtual tabletop to run roleplaying games. It is licensed software and needs to be downloaded after purchase. This module doesn't manage the FoundryVTT program files, only operating it.

The downloaded FoundryVTT program files must be in ''${dataDir}/bin.

Backups: the data files - this requires briefly stopping the service, so don't schedule backups during game time.

Erase your darlings: overrides the dataDir.

Options:

Declared in: shared/foundryvtt/default.nix

minecraft

Minecraft Java Edition runner. Supports multiple servers, with mods. This module doesn't manage the Minecraft server files, only operating them.

Yes, I know there's a NixOS minecraft module, but it uses the Minecraft in nixpkgs and only runs one server, whereas I want to run multiple modded servers.

The Minecraft server files must be in ''${dataDir}/{name}.

This module does not include a backup script. Servers must be backed up independently.

Erase your darlings: overrides the dataDir.

Options:

Declared in: shared/minecraft/default.nix

oci-containers

To do

Run podman containers run as a non-root user.

An abstraction over running containers as systemd units, enforcing some good practices:

  • Container DNS behaves the same under docker and podman.
  • Ports are exposed on 127.0.0.1, rather than 0.0.0.0.
  • Volumes are backed up by bind-mounts to the host filesystem.

Switching between using docker or podman for the container runtime should be totally transparent.

Erase your darlings: overrides the volumeBaseDir.

Options:

Declared in: shared/oci-containers/default.nix

pleroma

Pleroma is a fediverese server.

Pleroma uses a containerised postgres database.

Backups: the postgres database, uploaded files, and custom emojis.

Erase your darlings: transparently stores data on the persistent volume.

Options:

Declared in: shared/pleroma/default.nix

resolved

resolved is a recursive DNS server for LAN DNS.

Provides a grafana dashboard.

Options:

Declared in: shared/resolved/default.nix

restic-backups

Manage regular incremental, compressed, and encrypted backups with restic.

Backups are uploaded to the barrucadu-backups-a19c48 B2 bucket.

List all the snapshots with:

nix run .#backups                                # all snapshots
nix run .#backups -- snapshots --host <hostname> # for a specific host
nix run .#backups -- snapshots --tag <tag>       # for a specific tag

Restore a snapshot to <restore-dir> with:

nix run .#backups restore <snapshot> [<restore-dir>]

If unspecified, the snapshot is restored to /tmp/restic-restore-<snapshot>.

Alerts:

  • Creating or uploading a snapshot fails.

Options:

Declared in: shared/restic-backups/default.nix

rtorrent

rTorrent is a bittorrent client. This module configures it in a way appropriate for private trackers.

This module does not include a backup script. Torrented files must be backed up independently.

Erase your darlings: transparently stores session data and logs on the persistent volume.

Options:

Declared in: shared/rtorrent/default.nix

umami

umami is a web analytics tool.

umami uses a containerised postgres database.

Backups: the postgres database.

Options:

Declared in: shared/umami/default.nix