Skip to content

Commit

Permalink
Document foundryvtt module and options
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Oct 15, 2023
1 parent 4325768 commit 7b823c7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
18 changes: 15 additions & 3 deletions shared/foundryvtt/default.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
31 changes: 28 additions & 3 deletions shared/foundryvtt/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'';
};
};
}

0 comments on commit 7b823c7

Please sign in to comment.