summary refs log tree commit diff
path: root/nixos/modules/services/torrent/transmission.nix
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2021-12-17 11:14:08 -0500
committerGitHub <noreply@github.com>2021-12-17 11:14:08 -0500
commit06edb74413eb4e4ac56921ef2c038d8f106b15df (patch)
tree897b78ed67fd8ffb0938fc85f52a496ff9785e7c /nixos/modules/services/torrent/transmission.nix
parent4edd5c91ca09665e33f705d280a4d9f7f093605f (diff)
parente67a646a925bc3cda86101a3f3afb81db3030ef5 (diff)
downloadnixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.gz
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.bz2
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.lz
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.xz
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.zst
nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.zip
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
Diffstat (limited to 'nixos/modules/services/torrent/transmission.nix')
-rw-r--r--nixos/modules/services/torrent/transmission.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix
index 9e440e49b50..d12d8aa2398 100644
--- a/nixos/modules/services/torrent/transmission.nix
+++ b/nixos/modules/services/torrent/transmission.nix
@@ -4,6 +4,7 @@ with lib;
 
 let
   cfg = config.services.transmission;
+  opt = options.services.transmission;
   inherit (config.environment) etc;
   apparmor = config.security.apparmor;
   rootDir = "/run/transmission";
@@ -47,11 +48,13 @@ in
           options.download-dir = mkOption {
             type = types.path;
             default = "${cfg.home}/${downloadsDir}";
+            defaultText = literalExpression ''"''${config.${opt.home}}/${downloadsDir}"'';
             description = "Directory where to download torrents.";
           };
           options.incomplete-dir = mkOption {
             type = types.path;
             default = "${cfg.home}/${incompleteDir}";
+            defaultText = literalExpression ''"''${config.${opt.home}}/${incompleteDir}"'';
             description = ''
               When enabled with
               services.transmission.home
@@ -147,6 +150,7 @@ in
           options.watch-dir = mkOption {
             type = types.path;
             default = "${cfg.home}/${watchDir}";
+            defaultText = literalExpression ''"''${config.${opt.home}}/${watchDir}"'';
             description = "Watch a directory for torrent files and add them to transmission.";
           };
           options.watch-dir-enabled = mkOption {