diff --git a/shared/foundryvtt/default.nix b/shared/foundryvtt/default.nix index 32a58b2a..449da38f 100644 --- a/shared/foundryvtt/default.nix +++ b/shared/foundryvtt/default.nix @@ -1,6 +1,18 @@ -# FoundryVTT is licensed software and needs to be downloaded after -# purchase. - +# [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 +# `{nixfiles.foundryvtt.dataDir}/bin`. +# +# If the `backups` module is enabled, adds a script to backup the data files. +# This requires briefly stopping the service, so don't schedule backups during +# game time. +# +# If the `erase-your-darlings` module is enabled, stores its data on the +# persistent volume. +# +# [FoundryVTT]: https://foundryvtt.com/ { config, lib, pkgs, ... }: with lib; diff --git a/shared/foundryvtt/options.nix b/shared/foundryvtt/options.nix index 18901369..9f59e5ea 100644 --- a/shared/foundryvtt/options.nix +++ b/shared/foundryvtt/options.nix @@ -4,8 +4,33 @@ with lib; { options.nixfiles.foundryvtt = { - enable = mkOption { type = types.bool; default = false; }; - port = mkOption { type = types.int; default = 46885; }; - dataDir = mkOption { type = types.str; default = "/var/lib/foundryvtt"; }; + enable = mkOption { + type = types.bool; + default = false; + description = mdDoc '' + Enable the `foundryvtt` service. + ''; + }; + + port = mkOption { + type = types.int; + default = 46885; + description = mdDoc '' + Port (on 127.0.0.1) to expode the foundryvtt service on. + ''; + }; + + dataDir = mkOption { + type = types.str; + default = "/var/lib/foundryvtt"; + description = mdDoc '' + Directory to store data files in. + + The downloaded FoundryVTT program files must be in `''${dataDir}/bin`. + + If the `erase-your-darlings` module is enabled, this is overridden to be + on the persistent volume. + ''; + }; }; }