anchor.diff:              cfg.settings.download-dir
             ] ++
             optional cfg.settings.incomplete-dir-enabled
  -            cfg.settings.incomplete-dir
  -          ++
  -          optional cfg.settings.watch-dir-enabled
  -            cfg.settings.watch-dir
  -          ;
  +            cfg.settings.incomplete-dir ++
  +          optional (cfg.settings.watch-dir-enabled && cfg.settings.trash-original-torrent-files)
  +            cfg.settings.watch-dir;
           BindReadOnlyPaths = [
             # No confinement done of /nix/store here like in systemd-confinement.nix,
             # an AppArmor profile is provided to get a confinement based upon paths and rights.
  
positive.code:         example = "775";
          description = ''
            The permissions set by <literal>systemd.activationScripts.transmission-daemon</literal>
            on the directories <link linkend="opt-services.transmission.settings">settings.download-dir</link>
            and <link linkend="opt-services.transmission.settings">settings.incomplete-dir</link>.
            Note that you may also want to change
            <link linkend="opt-services.transmission.settings">settings.umask</link>.
          '';
        };
  
        port = mkOption {
          type = types.port;
          description = ''
            TCP port number to run the RPC/web interface.
  
            If instead you want to change the peer port,
            use <link linkend="opt-services.transmission.settings">settings.peer-port</link>
            or <link linkend="opt-services.transmission.settings">settings.peer-port-random-on-start</link>.
          '';
        };
  
        home = mkOption {
          type = types.path;
          default = homeDir;
          description = ''
            The directory where Transmission will create <literal>${settingsDir}</literal>.
            as well as <literal>${downloadsDir}/</literal> unless <link linkend="opt-services.transmission.settings">settings.download-dir</link> is changed,
            and <literal>${incompleteDir}/</literal> unless <link linkend="opt-services.transmission.settings">settings.incomplete-dir</link> is changed.
          '';
        };
  
  
negative.code:       '' + optionalString cfg.settings.watch-dir-enabled ''
        install -d -m '${cfg.downloadDirPermissions}' -o '${cfg.user}' -g '${cfg.group}' '${cfg.settings.watch-dir}'
        '';
  
      systemd.services.transmission = {
        description = "Transmission BitTorrent Service";
  