diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 21:58:27 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:21:04 +0100 |
commit | e72435e6125f51a5f331080ed1862bdc86d36769 (patch) | |
tree | 69f8c218e9329deb848e5c21b842e007ccae6da4 /nixos/modules/services/games | |
parent | ed673a69dbf5f9be67183621eb0f5c1759d48299 (diff) |
treewide: make option descriptions constants
escape interpolations in descriptions where possible, replace them with sufficiently descriptive text elsewhere. also expand cfg.* paths in descriptions.
Diffstat (limited to 'nixos/modules/services/games')
-rw-r--r-- | nixos/modules/services/games/terraria.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/games/terraria.nix b/nixos/modules/services/games/terraria.nix index 7312c7e6b6352..29f976b3c2aec 100644 --- a/nixos/modules/services/games/terraria.nix +++ b/nixos/modules/services/games/terraria.nix @@ -1,9 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.services.terraria; + opt = options.services.terraria; worldSizeMap = { small = 1; medium = 2; large = 3; }; valFlag = name: val: optionalString (val != null) "-${name} \"${escape ["\\" "\""] (toString val)}\""; boolFlag = name: val: optionalString val "-${name}"; @@ -36,7 +37,7 @@ in type = types.bool; default = false; description = '' - If enabled, starts a Terraria server. The server can be connected to via <literal>tmux -S ${cfg.dataDir}/terraria.sock attach</literal> + If enabled, starts a Terraria server. The server can be connected to via <literal>tmux -S ''${config.${opt.dataDir}}/terraria.sock attach</literal> for administration by users who are a part of the <literal>terraria</literal> group (use <literal>C-b d</literal> shortcut to detach again). ''; }; |